#[!resolve_unexported] => #[resolve_unexported] to fix pretty printing#15115
#[!resolve_unexported] => #[resolve_unexported] to fix pretty printing#15115erickt wants to merge 1 commit intorust-lang:masterfrom
Conversation
Without this change, we were unable to do: % rustc --test --pretty expanded foo.rs > bar.rs % rustc bar.s
|
I believe that the name of this attribute was intentionally chosen so it could never be written down. This attribute allows a module to entirely bypass all privacy restrictions which is a little worrisome to allow on a general basis. |
|
That being said, I would very much like to say |
|
Hm, I didn't realize that's what it was doing. Having an attribute that does that feels a little icky. Is that mainly so we can write: Instead of: ? If so, i don't think adding |
|
@erickt the whole module path has to be |
|
Another possible solution to this problem would be to just not print the module with |
|
Yet another possible approach: rename |
|
@klutzy's idea of adding |
|
This seems isolated to pretty printing, and I would rather just not print the If pretty printing succeeds, then you'll have two top-level modules for running the test harness, and likely two |
|
This PR is obsoleted by #15847, which removes the need for |
|
Closing in favor of #15847. |
…g#15115) The `TyCtxt::hir_get_fn_id_for_return_block()` function was too broad, as it will return positively even when given part of an expression that can be used as a return value. A new `potential_return_of_enclosing_body()` utility function has been made to represent the fact that an expression might be directly returned from its enclosing body. changelog: [`return_and_then`]: prevent false positives in case of a partially used expression Fixes rust-lang/rust-clippy#15111 Fixes rust-lang/rust-clippy#14927 <!-- TRIAGEBOT_START --> <!-- TRIAGEBOT_SUMMARY_START --> ### Summary Notes - [Beta-nomination](rust-lang/rust-clippy#15115 (comment)) by [samueltardieu](https://github.com/samueltardieu) *Managed by `@rustbot`—see [help](https://forge.rust-lang.org/triagebot/note.html) for details* <!-- TRIAGEBOT_SUMMARY_END --> <!-- TRIAGEBOT_END -->
Without this change, we were unable to do:
% rustc --test --pretty expanded foo.rs > bar.rs
% rustc bar.s