We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a43598c commit c40a7f1Copy full SHA for c40a7f1
src/test/compile-fail/issue-17718-const-borrow.rs
@@ -23,4 +23,7 @@ const E: &'static UnsafeCell<usize> = &D.a;
23
const F: &'static C = &D;
24
//~^ ERROR: cannot borrow a constant which contains interior mutability
25
26
+const G: &'static UnsafeCell<usize> = &UnsafeCell::new(42);
27
+//~^ ERROR: cannot borrow a constant which contains interior mutability
28
+
29
fn main() {}
0 commit comments