]> git.lizzy.rs Git - rust.git/blobdiff - src/test/ui/thread-local-in-ctfe.stderr
Add FAQ for NLL migration
[rust.git] / src / test / ui / thread-local-in-ctfe.stderr
index 2b60ec1486cdeaf5b9dfbd6dd4eb5a8095754649..6869109e67fc06c4deba374cfefc7b91c92781eb 100644 (file)
@@ -10,23 +10,48 @@ error[E0625]: thread-local statics cannot be accessed at compile-time
 LL | static C: &u32 = &A;
    |                  ^^
 
+warning[E0712]: thread-local variable borrowed past end of function
+  --> $DIR/thread-local-in-ctfe.rs:9:18
+   |
+LL | static C: &u32 = &A;
+   |                  ^^- end of enclosing function is here
+   |                  |
+   |                  thread-local variables cannot be borrowed beyond the end of the function
+   |
+   = warning: this error has been downgraded to a warning for backwards compatibility with previous releases
+   = warning: this represents potential undefined behavior in your code and this warning will become a hard error in the future
+   = note: for more information, try `rustc --explain E0729`
+
 error[E0625]: thread-local statics cannot be accessed at compile-time
-  --> $DIR/thread-local-in-ctfe.rs:12:16
+  --> $DIR/thread-local-in-ctfe.rs:15:16
    |
 LL | const D: u32 = A;
    |                ^
 
 error[E0625]: thread-local statics cannot be accessed at compile-time
-  --> $DIR/thread-local-in-ctfe.rs:15:17
+  --> $DIR/thread-local-in-ctfe.rs:18:17
    |
 LL | const E: &u32 = &A;
    |                 ^^
 
+warning[E0712]: thread-local variable borrowed past end of function
+  --> $DIR/thread-local-in-ctfe.rs:18:17
+   |
+LL | const E: &u32 = &A;
+   |                 ^^- end of enclosing function is here
+   |                 |
+   |                 thread-local variables cannot be borrowed beyond the end of the function
+   |
+   = warning: this error has been downgraded to a warning for backwards compatibility with previous releases
+   = warning: this represents potential undefined behavior in your code and this warning will become a hard error in the future
+   = note: for more information, try `rustc --explain E0729`
+
 error[E0625]: thread-local statics cannot be accessed at compile-time
-  --> $DIR/thread-local-in-ctfe.rs:19:5
+  --> $DIR/thread-local-in-ctfe.rs:25:5
    |
 LL |     A
    |     ^
 
 error: aborting due to 5 previous errors
 
+For more information about this error, try `rustc --explain E0712`.