--- /dev/null
+error[E0133]: call to unsafe function is unsafe and requires unsafe function or block
+ --> $DIR/async-unsafe-fn-call-in-safe.rs:14:5
+ |
+LL | S::f();
+ | ^^^^^^ call to unsafe function
+ |
+ = note: consult the function's documentation for information on how to avoid undefined behavior
+
+error[E0133]: call to unsafe function is unsafe and requires unsafe function or block
+ --> $DIR/async-unsafe-fn-call-in-safe.rs:15:5
+ |
+LL | f();
+ | ^^^ call to unsafe function
+ |
+ = note: consult the function's documentation for information on how to avoid undefined behavior
+
+error[E0133]: call to unsafe function is unsafe and requires unsafe function or block
+ --> $DIR/async-unsafe-fn-call-in-safe.rs:19:5
+ |
+LL | S::f();
+ | ^^^^^^ call to unsafe function
+ |
+ = note: consult the function's documentation for information on how to avoid undefined behavior
+
+error[E0133]: call to unsafe function is unsafe and requires unsafe function or block
+ --> $DIR/async-unsafe-fn-call-in-safe.rs:20:5
+ |
+LL | f();
+ | ^^^ call to unsafe function
+ |
+ = note: consult the function's documentation for information on how to avoid undefined behavior
+
+error: aborting due to 4 previous errors
+
+For more information about this error, try `rustc --explain E0133`.
// edition:2018
+// revisions: mir thir
+// [thir]compile-flags: -Z thir-unsafeck
struct S;
+++ /dev/null
-error[E0133]: call to unsafe function is unsafe and requires unsafe function or block
- --> $DIR/async-unsafe-fn-call-in-safe.rs:12:5
- |
-LL | S::f();
- | ^^^^^^ call to unsafe function
- |
- = note: consult the function's documentation for information on how to avoid undefined behavior
-
-error[E0133]: call to unsafe function is unsafe and requires unsafe function or block
- --> $DIR/async-unsafe-fn-call-in-safe.rs:13:5
- |
-LL | f();
- | ^^^ call to unsafe function
- |
- = note: consult the function's documentation for information on how to avoid undefined behavior
-
-error[E0133]: call to unsafe function is unsafe and requires unsafe function or block
- --> $DIR/async-unsafe-fn-call-in-safe.rs:17:5
- |
-LL | S::f();
- | ^^^^^^ call to unsafe function
- |
- = note: consult the function's documentation for information on how to avoid undefined behavior
-
-error[E0133]: call to unsafe function is unsafe and requires unsafe function or block
- --> $DIR/async-unsafe-fn-call-in-safe.rs:18:5
- |
-LL | f();
- | ^^^ call to unsafe function
- |
- = note: consult the function's documentation for information on how to avoid undefined behavior
-
-error: aborting due to 4 previous errors
-
-For more information about this error, try `rustc --explain E0133`.
--- /dev/null
+error[E0133]: call to unsafe function is unsafe and requires unsafe function or block
+ --> $DIR/async-unsafe-fn-call-in-safe.rs:14:5
+ |
+LL | S::f();
+ | ^^^^^^ call to unsafe function
+ |
+ = note: consult the function's documentation for information on how to avoid undefined behavior
+
+error[E0133]: call to unsafe function is unsafe and requires unsafe function or block
+ --> $DIR/async-unsafe-fn-call-in-safe.rs:15:5
+ |
+LL | f();
+ | ^^^ call to unsafe function
+ |
+ = note: consult the function's documentation for information on how to avoid undefined behavior
+
+error[E0133]: call to unsafe function is unsafe and requires unsafe function or block
+ --> $DIR/async-unsafe-fn-call-in-safe.rs:19:5
+ |
+LL | S::f();
+ | ^^^^^^ call to unsafe function
+ |
+ = note: consult the function's documentation for information on how to avoid undefined behavior
+
+error[E0133]: call to unsafe function is unsafe and requires unsafe function or block
+ --> $DIR/async-unsafe-fn-call-in-safe.rs:20:5
+ |
+LL | f();
+ | ^^^ call to unsafe function
+ |
+ = note: consult the function's documentation for information on how to avoid undefined behavior
+
+error: aborting due to 4 previous errors
+
+For more information about this error, try `rustc --explain E0133`.
--- /dev/null
+error[E0133]: call to unsafe function is unsafe and requires unsafe function or block
+ --> $DIR/closure_no_cap_coerce_many_unsafe_0.rs:15:23
+ |
+LL | let result: i32 = foo(5, 5);
+ | ^^^^^^^^^ call to unsafe function
+ |
+ = note: consult the function's documentation for information on how to avoid undefined behavior
+
+error[E0133]: call to unsafe function is unsafe and requires unsafe function or block
+ --> $DIR/closure_no_cap_coerce_many_unsafe_0.rs:24:23
+ |
+LL | let result: i32 = foo(5, 5);
+ | ^^^^^^^^^ call to unsafe function
+ |
+ = note: consult the function's documentation for information on how to avoid undefined behavior
+
+error: aborting due to 2 previous errors
+
+For more information about this error, try `rustc --explain E0133`.
+// revisions: mir thir
+// [thir]compile-flags: -Z thir-unsafeck
+
// Ensure we get unsafe function after coercion
unsafe fn add(a: i32, b: i32) -> i32 {
a + b
+++ /dev/null
-error[E0133]: call to unsafe function is unsafe and requires unsafe function or block
- --> $DIR/closure_no_cap_coerce_many_unsafe_0.rs:12:23
- |
-LL | let result: i32 = foo(5, 5);
- | ^^^^^^^^^ call to unsafe function
- |
- = note: consult the function's documentation for information on how to avoid undefined behavior
-
-error[E0133]: call to unsafe function is unsafe and requires unsafe function or block
- --> $DIR/closure_no_cap_coerce_many_unsafe_0.rs:21:23
- |
-LL | let result: i32 = foo(5, 5);
- | ^^^^^^^^^ call to unsafe function
- |
- = note: consult the function's documentation for information on how to avoid undefined behavior
-
-error: aborting due to 2 previous errors
-
-For more information about this error, try `rustc --explain E0133`.
--- /dev/null
+error[E0133]: call to unsafe function is unsafe and requires unsafe function or block
+ --> $DIR/closure_no_cap_coerce_many_unsafe_0.rs:15:23
+ |
+LL | let result: i32 = foo(5, 5);
+ | ^^^^^^^^^ call to unsafe function
+ |
+ = note: consult the function's documentation for information on how to avoid undefined behavior
+
+error[E0133]: call to unsafe function is unsafe and requires unsafe function or block
+ --> $DIR/closure_no_cap_coerce_many_unsafe_0.rs:24:23
+ |
+LL | let result: i32 = foo(5, 5);
+ | ^^^^^^^^^ call to unsafe function
+ |
+ = note: consult the function's documentation for information on how to avoid undefined behavior
+
+error: aborting due to 2 previous errors
+
+For more information about this error, try `rustc --explain E0133`.
--- /dev/null
+error[E0133]: call to unsafe function is unsafe and requires unsafe function or block
+ --> $DIR/coerce-unsafe-closure-to-unsafe-fn-ptr.rs:5:31
+ |
+LL | let _: unsafe fn() = || { ::std::pin::Pin::new_unchecked(&0_u8); };
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
+ |
+ = note: consult the function's documentation for information on how to avoid undefined behavior
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0133`.
+// revisions: mir thir
+// [thir]compile-flags: -Z thir-unsafeck
+
fn main() {
let _: unsafe fn() = || { ::std::pin::Pin::new_unchecked(&0_u8); };
//~^ ERROR E0133
+++ /dev/null
-error[E0133]: call to unsafe function is unsafe and requires unsafe function or block
- --> $DIR/coerce-unsafe-closure-to-unsafe-fn-ptr.rs:2:31
- |
-LL | let _: unsafe fn() = || { ::std::pin::Pin::new_unchecked(&0_u8); };
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
- |
- = note: consult the function's documentation for information on how to avoid undefined behavior
-
-error: aborting due to previous error
-
-For more information about this error, try `rustc --explain E0133`.
--- /dev/null
+error[E0133]: call to unsafe function is unsafe and requires unsafe function or block
+ --> $DIR/coerce-unsafe-closure-to-unsafe-fn-ptr.rs:5:31
+ |
+LL | let _: unsafe fn() = || { ::std::pin::Pin::new_unchecked(&0_u8); };
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
+ |
+ = note: consult the function's documentation for information on how to avoid undefined behavior
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0133`.
--- /dev/null
+error[E0133]: call to unsafe function is unsafe and requires unsafe function or block
+ --> $DIR/const-extern-fn-requires-unsafe.rs:11:5
+ |
+LL | foo();
+ | ^^^^^ call to unsafe function
+ |
+ = note: consult the function's documentation for information on how to avoid undefined behavior
+
+error[E0133]: call to unsafe function is unsafe and requires unsafe function or block
+ --> $DIR/const-extern-fn-requires-unsafe.rs:9:17
+ |
+LL | let a: [u8; foo()];
+ | ^^^^^ call to unsafe function
+ |
+ = note: consult the function's documentation for information on how to avoid undefined behavior
+
+error: aborting due to 2 previous errors
+
+For more information about this error, try `rustc --explain E0133`.
+// revisions: mir thir
+// [thir]compile-flags: -Z thir-unsafeck
+
#![feature(const_extern_fn)]
const unsafe extern "C" fn foo() -> usize { 5 }
+++ /dev/null
-error[E0133]: call to unsafe function is unsafe and requires unsafe function or block
- --> $DIR/const-extern-fn-requires-unsafe.rs:8:5
- |
-LL | foo();
- | ^^^^^ call to unsafe function
- |
- = note: consult the function's documentation for information on how to avoid undefined behavior
-
-error[E0133]: call to unsafe function is unsafe and requires unsafe function or block
- --> $DIR/const-extern-fn-requires-unsafe.rs:6:17
- |
-LL | let a: [u8; foo()];
- | ^^^^^ call to unsafe function
- |
- = note: consult the function's documentation for information on how to avoid undefined behavior
-
-error: aborting due to 2 previous errors
-
-For more information about this error, try `rustc --explain E0133`.
--- /dev/null
+error[E0133]: call to unsafe function is unsafe and requires unsafe function or block
+ --> $DIR/const-extern-fn-requires-unsafe.rs:11:5
+ |
+LL | foo();
+ | ^^^^^ call to unsafe function
+ |
+ = note: consult the function's documentation for information on how to avoid undefined behavior
+
+error[E0133]: call to unsafe function is unsafe and requires unsafe function or block
+ --> $DIR/const-extern-fn-requires-unsafe.rs:9:17
+ |
+LL | let a: [u8; foo()];
+ | ^^^^^ call to unsafe function
+ |
+ = note: consult the function's documentation for information on how to avoid undefined behavior
+
+error: aborting due to 2 previous errors
+
+For more information about this error, try `rustc --explain E0133`.
--- /dev/null
+error[E0133]: call to unsafe function is unsafe and requires unsafe function or block
+ --> $DIR/E0133.rs:7:5
+ |
+LL | f();
+ | ^^^ call to unsafe function
+ |
+ = note: consult the function's documentation for information on how to avoid undefined behavior
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0133`.
+// revisions: mir thir
+// [thir]compile-flags: -Z thir-unsafeck
+
unsafe fn f() { return; }
fn main() {
+++ /dev/null
-error[E0133]: call to unsafe function is unsafe and requires unsafe function or block
- --> $DIR/E0133.rs:4:5
- |
-LL | f();
- | ^^^ call to unsafe function
- |
- = note: consult the function's documentation for information on how to avoid undefined behavior
-
-error: aborting due to previous error
-
-For more information about this error, try `rustc --explain E0133`.
--- /dev/null
+error[E0133]: call to unsafe function is unsafe and requires unsafe function or block
+ --> $DIR/E0133.rs:7:5
+ |
+LL | f();
+ | ^^^ call to unsafe function
+ |
+ = note: consult the function's documentation for information on how to avoid undefined behavior
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0133`.
--- /dev/null
+error[E0658]: `transmute` is not allowed in constant functions
+ --> $DIR/feature-gate-const_fn_transmute.rs:11:43
+ |
+LL | const fn transmute_fn() -> u32 { unsafe { mem::transmute(Foo(3)) } }
+ | ^^^^^^^^^^^^^^^^^^^^^^
+ |
+ = note: see issue #53605 <https://github.com/rust-lang/rust/issues/53605> for more information
+ = help: add `#![feature(const_fn_transmute)]` to the crate attributes to enable
+ = note: `transmute` is only allowed in constants and statics for now
+
+error[E0658]: `transmute` is not allowed in constant functions
+ --> $DIR/feature-gate-const_fn_transmute.rs:14:53
+ |
+LL | const fn transmute_fn_intrinsic() -> u32 { unsafe { std::intrinsics::transmute(Foo(3)) } }
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ |
+ = note: see issue #53605 <https://github.com/rust-lang/rust/issues/53605> for more information
+ = help: add `#![feature(const_fn_transmute)]` to the crate attributes to enable
+ = note: `transmute` is only allowed in constants and statics for now
+
+error[E0658]: `transmute` is not allowed in constant functions
+ --> $DIR/feature-gate-const_fn_transmute.rs:17:58
+ |
+LL | const fn transmute_fn_core_intrinsic() -> u32 { unsafe { core::intrinsics::transmute(Foo(3)) } }
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ |
+ = note: see issue #53605 <https://github.com/rust-lang/rust/issues/53605> for more information
+ = help: add `#![feature(const_fn_transmute)]` to the crate attributes to enable
+ = note: `transmute` is only allowed in constants and statics for now
+
+error[E0658]: `transmute` is not allowed in constant functions
+ --> $DIR/feature-gate-const_fn_transmute.rs:20:48
+ |
+LL | const unsafe fn unsafe_transmute_fn() -> u32 { mem::transmute(Foo(3)) }
+ | ^^^^^^^^^^^^^^^^^^^^^^
+ |
+ = note: see issue #53605 <https://github.com/rust-lang/rust/issues/53605> for more information
+ = help: add `#![feature(const_fn_transmute)]` to the crate attributes to enable
+ = note: `transmute` is only allowed in constants and statics for now
+
+error[E0658]: `transmute` is not allowed in constant functions
+ --> $DIR/feature-gate-const_fn_transmute.rs:23:58
+ |
+LL | const unsafe fn unsafe_transmute_fn_intrinsic() -> u32 { std::intrinsics::transmute(Foo(3)) }
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ |
+ = note: see issue #53605 <https://github.com/rust-lang/rust/issues/53605> for more information
+ = help: add `#![feature(const_fn_transmute)]` to the crate attributes to enable
+ = note: `transmute` is only allowed in constants and statics for now
+
+error[E0658]: `transmute` is not allowed in constant functions
+ --> $DIR/feature-gate-const_fn_transmute.rs:26:63
+ |
+LL | const unsafe fn unsafe_transmute_fn_core_intrinsic() -> u32 { core::intrinsics::transmute(Foo(3)) }
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ |
+ = note: see issue #53605 <https://github.com/rust-lang/rust/issues/53605> for more information
+ = help: add `#![feature(const_fn_transmute)]` to the crate attributes to enable
+ = note: `transmute` is only allowed in constants and statics for now
+
+error[E0658]: `transmute` is not allowed in constant functions
+ --> $DIR/feature-gate-const_fn_transmute.rs:29:39
+ |
+LL | const fn safe_transmute_fn() -> u32 { mem::transmute(Foo(3)) }
+ | ^^^^^^^^^^^^^^^^^^^^^^
+ |
+ = note: see issue #53605 <https://github.com/rust-lang/rust/issues/53605> for more information
+ = help: add `#![feature(const_fn_transmute)]` to the crate attributes to enable
+ = note: `transmute` is only allowed in constants and statics for now
+
+error[E0658]: `transmute` is not allowed in constant functions
+ --> $DIR/feature-gate-const_fn_transmute.rs:33:49
+ |
+LL | const fn safe_transmute_fn_intrinsic() -> u32 { std::intrinsics::transmute(Foo(3)) }
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ |
+ = note: see issue #53605 <https://github.com/rust-lang/rust/issues/53605> for more information
+ = help: add `#![feature(const_fn_transmute)]` to the crate attributes to enable
+ = note: `transmute` is only allowed in constants and statics for now
+
+error[E0658]: `transmute` is not allowed in constant functions
+ --> $DIR/feature-gate-const_fn_transmute.rs:37:54
+ |
+LL | const fn safe_transmute_fn_core_intrinsic() -> u32 { core::intrinsics::transmute(Foo(3)) }
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ |
+ = note: see issue #53605 <https://github.com/rust-lang/rust/issues/53605> for more information
+ = help: add `#![feature(const_fn_transmute)]` to the crate attributes to enable
+ = note: `transmute` is only allowed in constants and statics for now
+
+error[E0133]: call to unsafe function is unsafe and requires unsafe function or block
+ --> $DIR/feature-gate-const_fn_transmute.rs:29:39
+ |
+LL | const fn safe_transmute_fn() -> u32 { mem::transmute(Foo(3)) }
+ | ^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
+ |
+ = note: consult the function's documentation for information on how to avoid undefined behavior
+
+error[E0133]: call to unsafe function is unsafe and requires unsafe function or block
+ --> $DIR/feature-gate-const_fn_transmute.rs:33:49
+ |
+LL | const fn safe_transmute_fn_intrinsic() -> u32 { std::intrinsics::transmute(Foo(3)) }
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
+ |
+ = note: consult the function's documentation for information on how to avoid undefined behavior
+
+error[E0133]: call to unsafe function is unsafe and requires unsafe function or block
+ --> $DIR/feature-gate-const_fn_transmute.rs:37:54
+ |
+LL | const fn safe_transmute_fn_core_intrinsic() -> u32 { core::intrinsics::transmute(Foo(3)) }
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
+ |
+ = note: consult the function's documentation for information on how to avoid undefined behavior
+
+error: aborting due to 12 previous errors
+
+Some errors have detailed explanations: E0133, E0658.
+For more information about an error, try `rustc --explain E0133`.
+// revisions: mir thir
+// [thir]compile-flags: -Z thir-unsafeck
+
use std::mem;
#[repr(transparent)]
+++ /dev/null
-error[E0658]: `transmute` is not allowed in constant functions
- --> $DIR/feature-gate-const_fn_transmute.rs:8:43
- |
-LL | const fn transmute_fn() -> u32 { unsafe { mem::transmute(Foo(3)) } }
- | ^^^^^^^^^^^^^^^^^^^^^^
- |
- = note: see issue #53605 <https://github.com/rust-lang/rust/issues/53605> for more information
- = help: add `#![feature(const_fn_transmute)]` to the crate attributes to enable
- = note: `transmute` is only allowed in constants and statics for now
-
-error[E0658]: `transmute` is not allowed in constant functions
- --> $DIR/feature-gate-const_fn_transmute.rs:11:53
- |
-LL | const fn transmute_fn_intrinsic() -> u32 { unsafe { std::intrinsics::transmute(Foo(3)) } }
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- |
- = note: see issue #53605 <https://github.com/rust-lang/rust/issues/53605> for more information
- = help: add `#![feature(const_fn_transmute)]` to the crate attributes to enable
- = note: `transmute` is only allowed in constants and statics for now
-
-error[E0658]: `transmute` is not allowed in constant functions
- --> $DIR/feature-gate-const_fn_transmute.rs:14:58
- |
-LL | const fn transmute_fn_core_intrinsic() -> u32 { unsafe { core::intrinsics::transmute(Foo(3)) } }
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- |
- = note: see issue #53605 <https://github.com/rust-lang/rust/issues/53605> for more information
- = help: add `#![feature(const_fn_transmute)]` to the crate attributes to enable
- = note: `transmute` is only allowed in constants and statics for now
-
-error[E0658]: `transmute` is not allowed in constant functions
- --> $DIR/feature-gate-const_fn_transmute.rs:17:48
- |
-LL | const unsafe fn unsafe_transmute_fn() -> u32 { mem::transmute(Foo(3)) }
- | ^^^^^^^^^^^^^^^^^^^^^^
- |
- = note: see issue #53605 <https://github.com/rust-lang/rust/issues/53605> for more information
- = help: add `#![feature(const_fn_transmute)]` to the crate attributes to enable
- = note: `transmute` is only allowed in constants and statics for now
-
-error[E0658]: `transmute` is not allowed in constant functions
- --> $DIR/feature-gate-const_fn_transmute.rs:20:58
- |
-LL | const unsafe fn unsafe_transmute_fn_intrinsic() -> u32 { std::intrinsics::transmute(Foo(3)) }
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- |
- = note: see issue #53605 <https://github.com/rust-lang/rust/issues/53605> for more information
- = help: add `#![feature(const_fn_transmute)]` to the crate attributes to enable
- = note: `transmute` is only allowed in constants and statics for now
-
-error[E0658]: `transmute` is not allowed in constant functions
- --> $DIR/feature-gate-const_fn_transmute.rs:23:63
- |
-LL | const unsafe fn unsafe_transmute_fn_core_intrinsic() -> u32 { core::intrinsics::transmute(Foo(3)) }
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- |
- = note: see issue #53605 <https://github.com/rust-lang/rust/issues/53605> for more information
- = help: add `#![feature(const_fn_transmute)]` to the crate attributes to enable
- = note: `transmute` is only allowed in constants and statics for now
-
-error[E0658]: `transmute` is not allowed in constant functions
- --> $DIR/feature-gate-const_fn_transmute.rs:26:39
- |
-LL | const fn safe_transmute_fn() -> u32 { mem::transmute(Foo(3)) }
- | ^^^^^^^^^^^^^^^^^^^^^^
- |
- = note: see issue #53605 <https://github.com/rust-lang/rust/issues/53605> for more information
- = help: add `#![feature(const_fn_transmute)]` to the crate attributes to enable
- = note: `transmute` is only allowed in constants and statics for now
-
-error[E0658]: `transmute` is not allowed in constant functions
- --> $DIR/feature-gate-const_fn_transmute.rs:30:49
- |
-LL | const fn safe_transmute_fn_intrinsic() -> u32 { std::intrinsics::transmute(Foo(3)) }
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- |
- = note: see issue #53605 <https://github.com/rust-lang/rust/issues/53605> for more information
- = help: add `#![feature(const_fn_transmute)]` to the crate attributes to enable
- = note: `transmute` is only allowed in constants and statics for now
-
-error[E0658]: `transmute` is not allowed in constant functions
- --> $DIR/feature-gate-const_fn_transmute.rs:34:54
- |
-LL | const fn safe_transmute_fn_core_intrinsic() -> u32 { core::intrinsics::transmute(Foo(3)) }
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- |
- = note: see issue #53605 <https://github.com/rust-lang/rust/issues/53605> for more information
- = help: add `#![feature(const_fn_transmute)]` to the crate attributes to enable
- = note: `transmute` is only allowed in constants and statics for now
-
-error[E0133]: call to unsafe function is unsafe and requires unsafe function or block
- --> $DIR/feature-gate-const_fn_transmute.rs:26:39
- |
-LL | const fn safe_transmute_fn() -> u32 { mem::transmute(Foo(3)) }
- | ^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
- |
- = note: consult the function's documentation for information on how to avoid undefined behavior
-
-error[E0133]: call to unsafe function is unsafe and requires unsafe function or block
- --> $DIR/feature-gate-const_fn_transmute.rs:30:49
- |
-LL | const fn safe_transmute_fn_intrinsic() -> u32 { std::intrinsics::transmute(Foo(3)) }
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
- |
- = note: consult the function's documentation for information on how to avoid undefined behavior
-
-error[E0133]: call to unsafe function is unsafe and requires unsafe function or block
- --> $DIR/feature-gate-const_fn_transmute.rs:34:54
- |
-LL | const fn safe_transmute_fn_core_intrinsic() -> u32 { core::intrinsics::transmute(Foo(3)) }
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
- |
- = note: consult the function's documentation for information on how to avoid undefined behavior
-
-error: aborting due to 12 previous errors
-
-Some errors have detailed explanations: E0133, E0658.
-For more information about an error, try `rustc --explain E0133`.
--- /dev/null
+error[E0658]: `transmute` is not allowed in constant functions
+ --> $DIR/feature-gate-const_fn_transmute.rs:11:43
+ |
+LL | const fn transmute_fn() -> u32 { unsafe { mem::transmute(Foo(3)) } }
+ | ^^^^^^^^^^^^^^^^^^^^^^
+ |
+ = note: see issue #53605 <https://github.com/rust-lang/rust/issues/53605> for more information
+ = help: add `#![feature(const_fn_transmute)]` to the crate attributes to enable
+ = note: `transmute` is only allowed in constants and statics for now
+
+error[E0658]: `transmute` is not allowed in constant functions
+ --> $DIR/feature-gate-const_fn_transmute.rs:14:53
+ |
+LL | const fn transmute_fn_intrinsic() -> u32 { unsafe { std::intrinsics::transmute(Foo(3)) } }
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ |
+ = note: see issue #53605 <https://github.com/rust-lang/rust/issues/53605> for more information
+ = help: add `#![feature(const_fn_transmute)]` to the crate attributes to enable
+ = note: `transmute` is only allowed in constants and statics for now
+
+error[E0658]: `transmute` is not allowed in constant functions
+ --> $DIR/feature-gate-const_fn_transmute.rs:17:58
+ |
+LL | const fn transmute_fn_core_intrinsic() -> u32 { unsafe { core::intrinsics::transmute(Foo(3)) } }
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ |
+ = note: see issue #53605 <https://github.com/rust-lang/rust/issues/53605> for more information
+ = help: add `#![feature(const_fn_transmute)]` to the crate attributes to enable
+ = note: `transmute` is only allowed in constants and statics for now
+
+error[E0658]: `transmute` is not allowed in constant functions
+ --> $DIR/feature-gate-const_fn_transmute.rs:20:48
+ |
+LL | const unsafe fn unsafe_transmute_fn() -> u32 { mem::transmute(Foo(3)) }
+ | ^^^^^^^^^^^^^^^^^^^^^^
+ |
+ = note: see issue #53605 <https://github.com/rust-lang/rust/issues/53605> for more information
+ = help: add `#![feature(const_fn_transmute)]` to the crate attributes to enable
+ = note: `transmute` is only allowed in constants and statics for now
+
+error[E0658]: `transmute` is not allowed in constant functions
+ --> $DIR/feature-gate-const_fn_transmute.rs:23:58
+ |
+LL | const unsafe fn unsafe_transmute_fn_intrinsic() -> u32 { std::intrinsics::transmute(Foo(3)) }
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ |
+ = note: see issue #53605 <https://github.com/rust-lang/rust/issues/53605> for more information
+ = help: add `#![feature(const_fn_transmute)]` to the crate attributes to enable
+ = note: `transmute` is only allowed in constants and statics for now
+
+error[E0658]: `transmute` is not allowed in constant functions
+ --> $DIR/feature-gate-const_fn_transmute.rs:26:63
+ |
+LL | const unsafe fn unsafe_transmute_fn_core_intrinsic() -> u32 { core::intrinsics::transmute(Foo(3)) }
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ |
+ = note: see issue #53605 <https://github.com/rust-lang/rust/issues/53605> for more information
+ = help: add `#![feature(const_fn_transmute)]` to the crate attributes to enable
+ = note: `transmute` is only allowed in constants and statics for now
+
+error[E0658]: `transmute` is not allowed in constant functions
+ --> $DIR/feature-gate-const_fn_transmute.rs:29:39
+ |
+LL | const fn safe_transmute_fn() -> u32 { mem::transmute(Foo(3)) }
+ | ^^^^^^^^^^^^^^^^^^^^^^
+ |
+ = note: see issue #53605 <https://github.com/rust-lang/rust/issues/53605> for more information
+ = help: add `#![feature(const_fn_transmute)]` to the crate attributes to enable
+ = note: `transmute` is only allowed in constants and statics for now
+
+error[E0658]: `transmute` is not allowed in constant functions
+ --> $DIR/feature-gate-const_fn_transmute.rs:33:49
+ |
+LL | const fn safe_transmute_fn_intrinsic() -> u32 { std::intrinsics::transmute(Foo(3)) }
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ |
+ = note: see issue #53605 <https://github.com/rust-lang/rust/issues/53605> for more information
+ = help: add `#![feature(const_fn_transmute)]` to the crate attributes to enable
+ = note: `transmute` is only allowed in constants and statics for now
+
+error[E0658]: `transmute` is not allowed in constant functions
+ --> $DIR/feature-gate-const_fn_transmute.rs:37:54
+ |
+LL | const fn safe_transmute_fn_core_intrinsic() -> u32 { core::intrinsics::transmute(Foo(3)) }
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ |
+ = note: see issue #53605 <https://github.com/rust-lang/rust/issues/53605> for more information
+ = help: add `#![feature(const_fn_transmute)]` to the crate attributes to enable
+ = note: `transmute` is only allowed in constants and statics for now
+
+error[E0133]: call to unsafe function is unsafe and requires unsafe function or block
+ --> $DIR/feature-gate-const_fn_transmute.rs:29:39
+ |
+LL | const fn safe_transmute_fn() -> u32 { mem::transmute(Foo(3)) }
+ | ^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
+ |
+ = note: consult the function's documentation for information on how to avoid undefined behavior
+
+error[E0133]: call to unsafe function is unsafe and requires unsafe function or block
+ --> $DIR/feature-gate-const_fn_transmute.rs:33:49
+ |
+LL | const fn safe_transmute_fn_intrinsic() -> u32 { std::intrinsics::transmute(Foo(3)) }
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
+ |
+ = note: consult the function's documentation for information on how to avoid undefined behavior
+
+error[E0133]: call to unsafe function is unsafe and requires unsafe function or block
+ --> $DIR/feature-gate-const_fn_transmute.rs:37:54
+ |
+LL | const fn safe_transmute_fn_core_intrinsic() -> u32 { core::intrinsics::transmute(Foo(3)) }
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
+ |
+ = note: consult the function's documentation for information on how to avoid undefined behavior
+
+error: aborting due to 12 previous errors
+
+Some errors have detailed explanations: E0133, E0658.
+For more information about an error, try `rustc --explain E0133`.
--- /dev/null
+error[E0133]: call to unsafe function is unsafe and requires unsafe function or block
+ --> $DIR/foreign-unsafe-fn-called.rs:11:5
+ |
+LL | test::free();
+ | ^^^^^^^^^^^^ call to unsafe function
+ |
+ = note: consult the function's documentation for information on how to avoid undefined behavior
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0133`.
+// revisions: mir thir
+// [thir]compile-flags: -Z thir-unsafeck
+
mod test {
extern "C" {
pub fn free();
+++ /dev/null
-error[E0133]: call to unsafe function is unsafe and requires unsafe function or block
- --> $DIR/foreign-unsafe-fn-called.rs:8:5
- |
-LL | test::free();
- | ^^^^^^^^^^^^ call to unsafe function
- |
- = note: consult the function's documentation for information on how to avoid undefined behavior
-
-error: aborting due to previous error
-
-For more information about this error, try `rustc --explain E0133`.
--- /dev/null
+error[E0133]: call to unsafe function is unsafe and requires unsafe function or block
+ --> $DIR/foreign-unsafe-fn-called.rs:11:5
+ |
+LL | test::free();
+ | ^^^^^^^^^^^^ call to unsafe function
+ |
+ = note: consult the function's documentation for information on how to avoid undefined behavior
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0133`.
--- /dev/null
+error[E0133]: call to unsafe function is unsafe and requires unsafe function or block
+ --> $DIR/unchecked_math_unsafe.rs:8:15
+ |
+LL | let add = std::intrinsics::unchecked_add(x, y);
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
+ |
+ = note: consult the function's documentation for information on how to avoid undefined behavior
+
+error[E0133]: call to unsafe function is unsafe and requires unsafe function or block
+ --> $DIR/unchecked_math_unsafe.rs:9:15
+ |
+LL | let sub = std::intrinsics::unchecked_sub(x, y);
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
+ |
+ = note: consult the function's documentation for information on how to avoid undefined behavior
+
+error[E0133]: call to unsafe function is unsafe and requires unsafe function or block
+ --> $DIR/unchecked_math_unsafe.rs:10:15
+ |
+LL | let mul = std::intrinsics::unchecked_mul(x, y);
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
+ |
+ = note: consult the function's documentation for information on how to avoid undefined behavior
+
+error: aborting due to 3 previous errors
+
+For more information about this error, try `rustc --explain E0133`.
+// revisions: mir thir
+// [thir]compile-flags: -Z thir-unsafeck
+
#![feature(core_intrinsics)]
fn main() {
+++ /dev/null
-error[E0133]: call to unsafe function is unsafe and requires unsafe function or block
- --> $DIR/unchecked_math_unsafe.rs:5:15
- |
-LL | let add = std::intrinsics::unchecked_add(x, y);
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
- |
- = note: consult the function's documentation for information on how to avoid undefined behavior
-
-error[E0133]: call to unsafe function is unsafe and requires unsafe function or block
- --> $DIR/unchecked_math_unsafe.rs:6:15
- |
-LL | let sub = std::intrinsics::unchecked_sub(x, y);
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
- |
- = note: consult the function's documentation for information on how to avoid undefined behavior
-
-error[E0133]: call to unsafe function is unsafe and requires unsafe function or block
- --> $DIR/unchecked_math_unsafe.rs:7:15
- |
-LL | let mul = std::intrinsics::unchecked_mul(x, y);
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
- |
- = note: consult the function's documentation for information on how to avoid undefined behavior
-
-error: aborting due to 3 previous errors
-
-For more information about this error, try `rustc --explain E0133`.
--- /dev/null
+error[E0133]: call to unsafe function is unsafe and requires unsafe function or block
+ --> $DIR/unchecked_math_unsafe.rs:8:15
+ |
+LL | let add = std::intrinsics::unchecked_add(x, y);
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
+ |
+ = note: consult the function's documentation for information on how to avoid undefined behavior
+
+error[E0133]: call to unsafe function is unsafe and requires unsafe function or block
+ --> $DIR/unchecked_math_unsafe.rs:9:15
+ |
+LL | let sub = std::intrinsics::unchecked_sub(x, y);
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
+ |
+ = note: consult the function's documentation for information on how to avoid undefined behavior
+
+error[E0133]: call to unsafe function is unsafe and requires unsafe function or block
+ --> $DIR/unchecked_math_unsafe.rs:10:15
+ |
+LL | let mul = std::intrinsics::unchecked_mul(x, y);
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
+ |
+ = note: consult the function's documentation for information on how to avoid undefined behavior
+
+error: aborting due to 3 previous errors
+
+For more information about this error, try `rustc --explain E0133`.
--- /dev/null
+error[E0133]: call to unsafe function is unsafe and requires unsafe function or block
+ --> $DIR/issue-28776.rs:7:5
+ |
+LL | (&ptr::write)(1 as *mut _, 42);
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
+ |
+ = note: consult the function's documentation for information on how to avoid undefined behavior
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0133`.
+// revisions: mir thir
+// [thir]compile-flags: -Z thir-unsafeck
+
use std::ptr;
fn main() {
+++ /dev/null
-error[E0133]: call to unsafe function is unsafe and requires unsafe function or block
- --> $DIR/issue-28776.rs:4:5
- |
-LL | (&ptr::write)(1 as *mut _, 42);
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
- |
- = note: consult the function's documentation for information on how to avoid undefined behavior
-
-error: aborting due to previous error
-
-For more information about this error, try `rustc --explain E0133`.
--- /dev/null
+error[E0133]: call to unsafe function is unsafe and requires unsafe function or block
+ --> $DIR/issue-28776.rs:7:5
+ |
+LL | (&ptr::write)(1 as *mut _, 42);
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
+ |
+ = note: consult the function's documentation for information on how to avoid undefined behavior
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0133`.
--- /dev/null
+error[E0133]: call to unsafe function is unsafe and requires unsafe function or block
+ --> $DIR/issue-3080.rs:10:5
+ |
+LL | X(()).with();
+ | ^^^^^^^^^^^^ call to unsafe function
+ |
+ = note: consult the function's documentation for information on how to avoid undefined behavior
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0133`.
+// revisions: mir thir
+// [thir]compile-flags: -Z thir-unsafeck
+
struct X(());
impl X {
pub unsafe fn with(&self) { }
+++ /dev/null
-error[E0133]: call to unsafe function is unsafe and requires unsafe function or block
- --> $DIR/issue-3080.rs:7:5
- |
-LL | X(()).with();
- | ^^^^^^^^^^^^ call to unsafe function
- |
- = note: consult the function's documentation for information on how to avoid undefined behavior
-
-error: aborting due to previous error
-
-For more information about this error, try `rustc --explain E0133`.
--- /dev/null
+error[E0133]: call to unsafe function is unsafe and requires unsafe function or block
+ --> $DIR/issue-3080.rs:10:5
+ |
+LL | X(()).with();
+ | ^^^^^^^^^^^^ call to unsafe function
+ |
+ = note: consult the function's documentation for information on how to avoid undefined behavior
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0133`.
--- /dev/null
+error[E0133]: call to unsafe function is unsafe and requires unsafe function or block
+ --> $DIR/issue-5844.rs:8:5
+ |
+LL | issue_5844_aux::rand();
+ | ^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
+ |
+ = note: consult the function's documentation for information on how to avoid undefined behavior
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0133`.
//aux-build:issue-5844-aux.rs
+// revisions: mir thir
+// [thir]compile-flags: -Z thir-unsafeck
extern crate issue_5844_aux;
+++ /dev/null
-error[E0133]: call to unsafe function is unsafe and requires unsafe function or block
- --> $DIR/issue-5844.rs:6:5
- |
-LL | issue_5844_aux::rand();
- | ^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
- |
- = note: consult the function's documentation for information on how to avoid undefined behavior
-
-error: aborting due to previous error
-
-For more information about this error, try `rustc --explain E0133`.
--- /dev/null
+error[E0133]: call to unsafe function is unsafe and requires unsafe function or block
+ --> $DIR/issue-5844.rs:8:5
+ |
+LL | issue_5844_aux::rand();
+ | ^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
+ |
+ = note: consult the function's documentation for information on how to avoid undefined behavior
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0133`.
--- /dev/null
+error[E0133]: call to unsafe function is unsafe and requires unsafe function or block
+ --> $DIR/issue-43733.rs:17:5
+ |
+LL | __KEY.get(Default::default)
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
+ |
+ = note: consult the function's documentation for information on how to avoid undefined behavior
+
+error[E0133]: call to unsafe function is unsafe and requires unsafe function or block
+ --> $DIR/issue-43733.rs:20:42
+ |
+LL | static FOO: std::thread::LocalKey<Foo> = std::thread::LocalKey::new(__getit);
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
+ |
+ = note: consult the function's documentation for information on how to avoid undefined behavior
+
+error: aborting due to 2 previous errors
+
+For more information about this error, try `rustc --explain E0133`.
+// revisions: mir thir
+// [thir]compile-flags: -Z thir-unsafeck
+
#![feature(thread_local)]
#![feature(cfg_target_thread_local, thread_local_internals)]
#[cfg(target_thread_local)]
#[thread_local]
-static __KEY: std::thread::__FastLocalKeyInner<Foo> =
- std::thread::__FastLocalKeyInner::new();
+static __KEY: std::thread::__FastLocalKeyInner<Foo> = std::thread::__FastLocalKeyInner::new();
#[cfg(not(target_thread_local))]
-static __KEY: std::thread::__OsLocalKeyInner<Foo> =
- std::thread::__OsLocalKeyInner::new();
+static __KEY: std::thread::__OsLocalKeyInner<Foo> = std::thread::__OsLocalKeyInner::new();
-fn __getit() -> std::option::Option<&'static Foo>
-{
+fn __getit() -> std::option::Option<&'static Foo> {
__KEY.get(Default::default) //~ ERROR call to unsafe function is unsafe
}
-static FOO: std::thread::LocalKey<Foo> =
- std::thread::LocalKey::new(__getit);
+static FOO: std::thread::LocalKey<Foo> = std::thread::LocalKey::new(__getit);
//~^ ERROR call to unsafe function is unsafe
fn main() {
FOO.with(|foo| println!("{}", foo.borrow()));
std::thread::spawn(|| {
FOO.with(|foo| *foo.borrow_mut() += "foo");
- }).join().unwrap();
+ })
+ .join()
+ .unwrap();
FOO.with(|foo| println!("{}", foo.borrow()));
}
+++ /dev/null
-error[E0133]: call to unsafe function is unsafe and requires unsafe function or block
- --> $DIR/issue-43733.rs:17:5
- |
-LL | __KEY.get(Default::default)
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
- |
- = note: consult the function's documentation for information on how to avoid undefined behavior
-
-error[E0133]: call to unsafe function is unsafe and requires unsafe function or block
- --> $DIR/issue-43733.rs:21:5
- |
-LL | std::thread::LocalKey::new(__getit);
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
- |
- = note: consult the function's documentation for information on how to avoid undefined behavior
-
-error: aborting due to 2 previous errors
-
-For more information about this error, try `rustc --explain E0133`.
--- /dev/null
+error[E0133]: call to unsafe function is unsafe and requires unsafe function or block
+ --> $DIR/issue-43733.rs:17:5
+ |
+LL | __KEY.get(Default::default)
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
+ |
+ = note: consult the function's documentation for information on how to avoid undefined behavior
+
+error[E0133]: call to unsafe function is unsafe and requires unsafe function or block
+ --> $DIR/issue-43733.rs:20:42
+ |
+LL | static FOO: std::thread::LocalKey<Foo> = std::thread::LocalKey::new(__getit);
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
+ |
+ = note: consult the function's documentation for information on how to avoid undefined behavior
+
+error: aborting due to 2 previous errors
+
+For more information about this error, try `rustc --explain E0133`.
--- /dev/null
+error[E0133]: call to unsafe function is unsafe and requires unsafe function or block
+ --> $DIR/unsafe-const-fn.rs:10:18
+ |
+LL | const VAL: u32 = dummy(0xFFFF);
+ | ^^^^^^^^^^^^^ call to unsafe function
+ |
+ = note: consult the function's documentation for information on how to avoid undefined behavior
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0133`.
// A quick test of 'unsafe const fn' functionality
+// revisions: mir thir
+// [thir]compile-flags: -Z thir-unsafeck
+
const unsafe fn dummy(v: u32) -> u32 {
!v
}
+++ /dev/null
-error[E0133]: call to unsafe function is unsafe and requires unsafe function or block
- --> $DIR/unsafe-const-fn.rs:7:18
- |
-LL | const VAL: u32 = dummy(0xFFFF);
- | ^^^^^^^^^^^^^ call to unsafe function
- |
- = note: consult the function's documentation for information on how to avoid undefined behavior
-
-error: aborting due to previous error
-
-For more information about this error, try `rustc --explain E0133`.
--- /dev/null
+error[E0133]: call to unsafe function is unsafe and requires unsafe function or block
+ --> $DIR/unsafe-const-fn.rs:10:18
+ |
+LL | const VAL: u32 = dummy(0xFFFF);
+ | ^^^^^^^^^^^^^ call to unsafe function
+ |
+ = note: consult the function's documentation for information on how to avoid undefined behavior
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0133`.
--- /dev/null
+error[E0133]: call to unsafe function is unsafe and requires unsafe function or block
+ --> $DIR/unsafe-fn-called-from-safe.rs:7:5
+ |
+LL | f();
+ | ^^^ call to unsafe function
+ |
+ = note: consult the function's documentation for information on how to avoid undefined behavior
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0133`.
+// revisions: mir thir
+// [thir]compile-flags: -Z thir-unsafeck
+
unsafe fn f() { return; }
fn main() {
+++ /dev/null
-error[E0133]: call to unsafe function is unsafe and requires unsafe function or block
- --> $DIR/unsafe-fn-called-from-safe.rs:4:5
- |
-LL | f();
- | ^^^ call to unsafe function
- |
- = note: consult the function's documentation for information on how to avoid undefined behavior
-
-error: aborting due to previous error
-
-For more information about this error, try `rustc --explain E0133`.
--- /dev/null
+error[E0133]: call to unsafe function is unsafe and requires unsafe function or block
+ --> $DIR/unsafe-fn-called-from-safe.rs:7:5
+ |
+LL | f();
+ | ^^^ call to unsafe function
+ |
+ = note: consult the function's documentation for information on how to avoid undefined behavior
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0133`.
--- /dev/null
+error[E0133]: call to unsafe function is unsafe and requires unsafe function or block
+ --> $DIR/unsafe-fn-used-as-value.rs:8:5
+ |
+LL | x();
+ | ^^^ call to unsafe function
+ |
+ = note: consult the function's documentation for information on how to avoid undefined behavior
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0133`.
+// revisions: mir thir
+// [thir]compile-flags: -Z thir-unsafeck
+
unsafe fn f() { return; }
fn main() {
+++ /dev/null
-error[E0133]: call to unsafe function is unsafe and requires unsafe function or block
- --> $DIR/unsafe-fn-used-as-value.rs:5:5
- |
-LL | x();
- | ^^^ call to unsafe function
- |
- = note: consult the function's documentation for information on how to avoid undefined behavior
-
-error: aborting due to previous error
-
-For more information about this error, try `rustc --explain E0133`.
--- /dev/null
+error[E0133]: call to unsafe function is unsafe and requires unsafe function or block
+ --> $DIR/unsafe-fn-used-as-value.rs:8:5
+ |
+LL | x();
+ | ^^^ call to unsafe function
+ |
+ = note: consult the function's documentation for information on how to avoid undefined behavior
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0133`.
const ENTRY_LIMIT: usize = 1000;
// FIXME: The following limits should be reduced eventually.
-const ROOT_ENTRY_LIMIT: usize = 1388;
+const ROOT_ENTRY_LIMIT: usize = 1369;
const ISSUES_ENTRY_LIMIT: usize = 2551;
fn check_entries(path: &Path, bad: &mut bool) {