diff options
author | Nilstrieb <48135649+Nilstrieb@users.noreply.github.com> | 2022-11-16 21:46:06 +0100 |
---|---|---|
committer | yukang <moorekang@gmail.com> | 2023-05-01 16:15:13 +0800 |
commit | c63b6a437eb16d13fbc0e72e091813579895bc9f (patch) | |
tree | e8f76dda7c8e719159690efab7899d68ed0acb09 /tests/ui/macros | |
parent | 2034b6d23ca18311a23273f2f08c381a04fa05d9 (diff) | |
download | rust-c63b6a437eb16d13fbc0e72e091813579895bc9f.tar.gz |
Rip it out
My type ascription
Oh rip it out
Ah
If you think we live too much then
You can sacrifice diagnostics
Don't mix your garbage
Into my syntax
So many weird hacks keep diagnostics alive
Yet I don't even step outside
So many bad diagnostics keep tyasc alive
Yet tyasc doesn't even bother to survive!
Diffstat (limited to 'tests/ui/macros')
-rw-r--r-- | tests/ui/macros/builtin-prelude-no-accidents.stderr | 15 | ||||
-rw-r--r-- | tests/ui/macros/stringify.rs | 3 |
2 files changed, 10 insertions, 8 deletions
diff --git a/tests/ui/macros/builtin-prelude-no-accidents.stderr b/tests/ui/macros/builtin-prelude-no-accidents.stderr index 56af618d484..8cd9a63b808 100644 --- a/tests/ui/macros/builtin-prelude-no-accidents.stderr +++ b/tests/ui/macros/builtin-prelude-no-accidents.stderr @@ -4,18 +4,21 @@ error[E0433]: failed to resolve: use of undeclared crate or module `env` LL | env::current_dir; | ^^^ use of undeclared crate or module `env` +error[E0433]: failed to resolve: use of undeclared crate or module `vec` + --> $DIR/builtin-prelude-no-accidents.rs:7:14 + | +LL | type B = vec::Vec<u8>; + | ^^^ + | | + | use of undeclared crate or module `vec` + | help: a struct with a similar name exists (notice the capitalization): `Vec` + error[E0433]: failed to resolve: use of undeclared crate or module `panic` --> $DIR/builtin-prelude-no-accidents.rs:6:14 | LL | type A = panic::PanicInfo; | ^^^^^ use of undeclared crate or module `panic` -error[E0433]: failed to resolve: use of undeclared crate or module `vec` - --> $DIR/builtin-prelude-no-accidents.rs:7:14 - | -LL | type B = vec::Vec<u8>; - | ^^^ use of undeclared crate or module `vec` - error: aborting due to 3 previous errors For more information about this error, try `rustc --explain E0433`. diff --git a/tests/ui/macros/stringify.rs b/tests/ui/macros/stringify.rs index 79d8cd75716..816f99baa84 100644 --- a/tests/ui/macros/stringify.rs +++ b/tests/ui/macros/stringify.rs @@ -134,8 +134,7 @@ fn test_expr() { assert_eq!(stringify_expr!(expr as T<u8>), "expr as T<u8>"); // ExprKind::Type - assert_eq!(stringify_expr!(expr: T), "expr: T"); - assert_eq!(stringify_expr!(expr: T<u8>), "expr: T<u8>"); + // There is no syntax for type ascription. // ExprKind::If assert_eq!(stringify_expr!(if true {}), "if true {}"); |