-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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 #55989 - pietroalbini:beta-rollup, r=pietroalbini
[beta] Rollup backports Merged and approved: * #55947: xLTO: Don't pass --plugin-opt=thin to LLD. That's not supported anymore. * #55800: Fix ICE in `return_type_impl_trait` * #55630: resolve: Filter away macro prelude in modules with `#[no_implicit_prelude]` on 2018 edition r? @ghost
- Loading branch information
Showing
9 changed files
with
124 additions
and
17 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
// edition:2018 | ||
|
||
#[no_implicit_prelude] | ||
mod bar { | ||
fn f() { | ||
::std::print!(""); // OK | ||
print!(); //~ ERROR cannot find macro `print!` in this scope | ||
} | ||
} | ||
|
||
fn main() {} |
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,10 @@ | ||
error: cannot find macro `print!` in this scope | ||
--> $DIR/no_implicit_prelude-2018.rs:7:9 | ||
| | ||
LL | print!(); //~ ERROR cannot find macro `print!` in this scope | ||
| ^^^^^ | ||
| | ||
= help: have you added the `#[macro_use]` on the module/import? | ||
|
||
error: aborting due to previous error | ||
|
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 |
---|---|---|
@@ -0,0 +1,22 @@ | ||
pub trait EdgeTrait<N> { | ||
fn target(&self) -> N; | ||
} | ||
|
||
pub trait Graph<'a> { | ||
type Node; | ||
type Edge: EdgeTrait<Self::Node>; | ||
type NodesIter: Iterator<Item = Self::Node> + 'a; | ||
type EdgesIter: Iterator<Item = Self::Edge> + 'a; | ||
|
||
fn nodes(&'a self) -> Self::NodesIter; | ||
fn out_edges(&'a self, u: &Self::Node) -> Self::EdgesIter; | ||
fn in_edges(&'a self, u: &Self::Node) -> Self::EdgesIter; | ||
|
||
fn out_neighbors(&'a self, u: &Self::Node) -> Box<Iterator<Item = Self::Node>> { | ||
Box::new(self.out_edges(u).map(|e| e.target())) | ||
} | ||
|
||
fn in_neighbors(&'a self, u: &Self::Node) -> Box<Iterator<Item = Self::Node>> { | ||
Box::new(self.in_edges(u).map(|e| e.target())) | ||
} | ||
} |
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,50 @@ | ||
error[E0601]: `main` function not found in crate `issue_55796` | ||
| | ||
= note: consider adding a `main` function to `$DIR/issue-55796.rs` | ||
|
||
error[E0495]: cannot infer an appropriate lifetime due to conflicting requirements | ||
--> $DIR/issue-55796.rs:16:9 | ||
| | ||
LL | Box::new(self.out_edges(u).map(|e| e.target())) | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
| | ||
note: first, the lifetime cannot outlive the lifetime 'a as defined on the trait at 5:17... | ||
--> $DIR/issue-55796.rs:5:17 | ||
| | ||
LL | pub trait Graph<'a> { | ||
| ^^ | ||
note: ...so that the type `std::iter::Map<<Self as Graph<'a>>::EdgesIter, [closure@$DIR/issue-55796.rs:16:40: 16:54]>` will meet its required lifetime bounds | ||
--> $DIR/issue-55796.rs:16:9 | ||
| | ||
LL | Box::new(self.out_edges(u).map(|e| e.target())) | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
= note: but, the lifetime must be valid for the static lifetime... | ||
= note: ...so that the expression is assignable: | ||
expected std::boxed::Box<(dyn std::iter::Iterator<Item=<Self as Graph<'a>>::Node> + 'static)> | ||
found std::boxed::Box<dyn std::iter::Iterator<Item=<Self as Graph<'a>>::Node>> | ||
|
||
error[E0495]: cannot infer an appropriate lifetime due to conflicting requirements | ||
--> $DIR/issue-55796.rs:20:9 | ||
| | ||
LL | Box::new(self.in_edges(u).map(|e| e.target())) | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
| | ||
note: first, the lifetime cannot outlive the lifetime 'a as defined on the trait at 5:17... | ||
--> $DIR/issue-55796.rs:5:17 | ||
| | ||
LL | pub trait Graph<'a> { | ||
| ^^ | ||
note: ...so that the type `std::iter::Map<<Self as Graph<'a>>::EdgesIter, [closure@$DIR/issue-55796.rs:20:39: 20:53]>` will meet its required lifetime bounds | ||
--> $DIR/issue-55796.rs:20:9 | ||
| | ||
LL | Box::new(self.in_edges(u).map(|e| e.target())) | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
= note: but, the lifetime must be valid for the static lifetime... | ||
= note: ...so that the expression is assignable: | ||
expected std::boxed::Box<(dyn std::iter::Iterator<Item=<Self as Graph<'a>>::Node> + 'static)> | ||
found std::boxed::Box<dyn std::iter::Iterator<Item=<Self as Graph<'a>>::Node>> | ||
|
||
error: aborting due to 3 previous errors | ||
|
||
Some errors occurred: E0495, E0601. | ||
For more information about an error, try `rustc --explain E0495`. |