diff options
Diffstat (limited to 'src')
| m--------- | src/doc/reference | 0 | ||||
| m--------- | src/doc/rustc-dev-guide | 0 | ||||
| -rw-r--r-- | src/test/ui/async-await/issues/issue-67893.rs | 2 | ||||
| -rw-r--r-- | src/test/ui/async-await/issues/issue-67893.stderr | 15 | ||||
| -rw-r--r-- | src/test/ui/resolve/issue-90113.rs | 21 | ||||
| -rw-r--r-- | src/test/ui/resolve/issue-90113.stderr | 14 | ||||
| -rw-r--r-- | src/tools/tidy/src/edition.rs | 10 |
7 files changed, 39 insertions, 23 deletions
diff --git a/src/doc/reference b/src/doc/reference -Subproject b5c68b02984f74e99d1f1b332029e05f607e266 +Subproject a01d151a7250a540a9cb7ccce5956f020c677c2 diff --git a/src/doc/rustc-dev-guide b/src/doc/rustc-dev-guide -Subproject fba15a46ca8efa97e8a955794724ac7ce27805b +Subproject b06008731af0f7d07cd0614e820c8276dfed1c1 diff --git a/src/test/ui/async-await/issues/issue-67893.rs b/src/test/ui/async-await/issues/issue-67893.rs index f34ce8081ca..8b53408d758 100644 --- a/src/test/ui/async-await/issues/issue-67893.rs +++ b/src/test/ui/async-await/issues/issue-67893.rs @@ -7,5 +7,5 @@ fn g(_: impl Send) {} fn main() { g(issue_67893::run()) - //~^ ERROR: `MutexGuard<'_, ()>` cannot be sent between threads safely + //~^ ERROR generator cannot be sent between threads safely } diff --git a/src/test/ui/async-await/issues/issue-67893.stderr b/src/test/ui/async-await/issues/issue-67893.stderr index c4b55e6ec20..7321a38c021 100644 --- a/src/test/ui/async-await/issues/issue-67893.stderr +++ b/src/test/ui/async-await/issues/issue-67893.stderr @@ -1,20 +1,10 @@ -error[E0277]: `MutexGuard<'_, ()>` cannot be sent between threads safely +error: generator cannot be sent between threads safely --> $DIR/issue-67893.rs:9:5 | LL | g(issue_67893::run()) - | ^ `MutexGuard<'_, ()>` cannot be sent between threads safely - | - ::: $DIR/auxiliary/issue_67893.rs:7:20 - | -LL | pub async fn run() { - | - within this `impl Future` + | ^ generator is not `Send` | = help: within `impl Future`, the trait `Send` is not implemented for `MutexGuard<'_, ()>` - = note: required because it appears within the type `for<'r, 's, 't0, 't1, 't2, 't3> {ResumeTy, Arc<Mutex<()>>, &'r Mutex<()>, Result<MutexGuard<'s, ()>, PoisonError<MutexGuard<'t0, ()>>>, &'t1 MutexGuard<'t2, ()>, MutexGuard<'t3, ()>, (), impl Future}` - = note: required because it appears within the type `[static generator@run::{closure#0}]` - = note: required because it appears within the type `from_generator::GenFuture<[static generator@run::{closure#0}]>` - = note: required because it appears within the type `impl Future` - = note: required because it appears within the type `impl Future` note: required by a bound in `g` --> $DIR/issue-67893.rs:6:14 | @@ -23,4 +13,3 @@ LL | fn g(_: impl Send) {} error: aborting due to previous error -For more information about this error, try `rustc --explain E0277`. diff --git a/src/test/ui/resolve/issue-90113.rs b/src/test/ui/resolve/issue-90113.rs new file mode 100644 index 00000000000..f6658b45ed1 --- /dev/null +++ b/src/test/ui/resolve/issue-90113.rs @@ -0,0 +1,21 @@ +mod list { + pub use self::List::Cons; + + pub enum List<T> { + Cons(T, Box<List<T>>), + } +} + +mod alias { + use crate::list::List; + + pub type Foo = List<String>; +} + +fn foo(l: crate::alias::Foo) { + match l { + Cons(..) => {} //~ ERROR: cannot find tuple struct or tuple variant `Cons` in this scope + } +} + +fn main() {} diff --git a/src/test/ui/resolve/issue-90113.stderr b/src/test/ui/resolve/issue-90113.stderr new file mode 100644 index 00000000000..1b78720571c --- /dev/null +++ b/src/test/ui/resolve/issue-90113.stderr @@ -0,0 +1,14 @@ +error[E0531]: cannot find tuple struct or tuple variant `Cons` in this scope + --> $DIR/issue-90113.rs:17:9 + | +LL | Cons(..) => {} + | ^^^^ not found in this scope + | +help: consider importing this tuple variant + | +LL | use list::List::Cons; + | + +error: aborting due to previous error + +For more information about this error, try `rustc --explain E0531`. diff --git a/src/tools/tidy/src/edition.rs b/src/tools/tidy/src/edition.rs index b5e9ceddbaf..3f59fefd041 100644 --- a/src/tools/tidy/src/edition.rs +++ b/src/tools/tidy/src/edition.rs @@ -18,21 +18,13 @@ pub fn check(path: &Path, bad: &mut bool) { &mut |path| super::filter_dirs(path) || path.ends_with("src/test"), &mut |entry, contents| { let file = entry.path(); - let filestr = file.to_string_lossy().replace("\\", "/"); let filename = file.file_name().unwrap(); if filename != "Cargo.toml" { return; } // Library crates are not yet ready to migrate to 2021. - // - // The reference and rustc-dev-guide are submodules, so are left at - // 2018 for now. They should be removed from this exception list - // when bumped. - if path.components().any(|c| c.as_os_str() == "library") - || filestr.contains("src/doc/reference/style-check/Cargo.toml") - || filestr.contains("src/doc/rustc-dev-guide/ci/date-check/Cargo.toml") - { + if path.components().any(|c| c.as_os_str() == "library") { let has = contents.lines().any(is_edition_2018); if !has { tidy_error!( |
