-
Notifications
You must be signed in to change notification settings - Fork 12.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of #66011 - Mark-Simulacrum:beta-backport, r=pietroalbini
[beta] backport rollup * save-analysis: Account for async desugaring in async fn return types #65936 * resolve: Turn the "non-empty glob must import something" error into a lint #65539 * Updated RELEASES.md for 1.39.0 #64878 (squashed)
- Loading branch information
Showing
7 changed files
with
195 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,40 @@ | ||
error[E0364]: `foo` is private, and cannot be re-exported | ||
--> $DIR/reexports.rs:6:17 | ||
--> $DIR/reexports.rs:8:17 | ||
| | ||
LL | pub use super::foo; | ||
| ^^^^^^^^^^ | ||
| | ||
note: consider marking `foo` as `pub` in the imported module | ||
--> $DIR/reexports.rs:6:17 | ||
--> $DIR/reexports.rs:8:17 | ||
| | ||
LL | pub use super::foo; | ||
| ^^^^^^^^^^ | ||
|
||
error: A non-empty glob must import something with the glob's visibility | ||
--> $DIR/reexports.rs:7:17 | ||
| | ||
LL | pub use super::*; | ||
| ^^^^^^^^ | ||
|
||
error[E0603]: module `foo` is private | ||
--> $DIR/reexports.rs:28:15 | ||
--> $DIR/reexports.rs:33:15 | ||
| | ||
LL | use b::a::foo::S; | ||
| ^^^ | ||
|
||
error[E0603]: module `foo` is private | ||
--> $DIR/reexports.rs:29:15 | ||
--> $DIR/reexports.rs:34:15 | ||
| | ||
LL | use b::b::foo::S as T; | ||
| ^^^ | ||
|
||
error: aborting due to 4 previous errors | ||
warning: glob import doesn't reexport anything because no candidate is public enough | ||
--> $DIR/reexports.rs:9:17 | ||
| | ||
LL | pub use super::*; | ||
| ^^^^^^^^ | ||
| | ||
note: lint level defined here | ||
--> $DIR/reexports.rs:1:9 | ||
| | ||
LL | #![warn(unused_imports)] | ||
| ^^^^^^^^^^^^^^ | ||
|
||
error: aborting due to 3 previous errors | ||
|
||
Some errors have detailed explanations: E0364, E0603. | ||
For more information about an error, try `rustc --explain E0364`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
// check-pass | ||
// compile-flags: -Zsave-analysis | ||
// edition:2018 | ||
|
||
// Async desugaring for return types in (associated) functions introduces a | ||
// separate definition internally, which we need to take into account | ||
// (or else we ICE). | ||
trait Trait { type Assoc; } | ||
struct Struct; | ||
|
||
async fn foobar<T: Trait>() -> T::Assoc { | ||
unimplemented!() | ||
} | ||
|
||
impl Struct { | ||
async fn foo<T: Trait>(&self) -> T::Assoc { | ||
unimplemented!() | ||
} | ||
} | ||
|
||
fn main() {} |