]> git.lizzy.rs Git - rust.git/blobdiff - tests/ui/declare_interior_mutable_const/others.stderr
check macro statements in non_copy_const.rs
[rust.git] / tests / ui / declare_interior_mutable_const / others.stderr
index fd0689dfc4c99db4dbc8dce74d0b2d3566e97e10..6cba9491ef4e8d1b6d30b78e1c48e9cea61a01c4 100644 (file)
@@ -35,5 +35,16 @@ LL | declare_const!(_ONCE: Once = Once::new()); //~ ERROR interior mutable
    |
    = note: this error originates in the macro `declare_const` (in Nightly builds, run with -Z macro-backtrace for more info)
 
-error: aborting due to 4 previous errors
+error: a `const` item should never be interior mutable
+  --> $DIR/others.rs:48:13
+   |
+LL |             const _BAZ: Cell<usize> = Cell::new(0); //~ ERROR interior mutable
+   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+...
+LL |     issue_8493!();
+   |     ------------- in this macro invocation
+   |
+   = note: this error originates in the macro `issue_8493` (in Nightly builds, run with -Z macro-backtrace for more info)
+
+error: aborting due to 5 previous errors