mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-30 10:45:18 +00:00
d89500843c
- Move super-fast-paren-parsing test into ui/parser - Move stmt_expr_attrs test into ui/feature-gates - Move macro tests into ui/macros - Move global_asm tests into ui/asm - Move env tests into ui/process - Move xcrate tests into ui/cross-crate - Move unop tests into ui/unop - Move backtrace tests into ui/backtrace - Move check-static tests into ui/statics - Move expr tests into ui/expr - Move optimization fuel tests into ui/fuel - Move ffi attribute tests into ui/ffi-attrs - Move suggestion tests into ui/suggestions - Move main tests into ui/fn-main - Move lint tests into ui/lint - Move repr tests into ui/repr - Move intrinsics tests into ui/intrinsics - Move tool lint tests into ui/tool-attributes - Move return tests into ui/return - Move pattern tests into ui/patttern - Move range tests into ui/range - Move foreign-fn tests into ui/foreign - Move orphan-check tests into ui/coherence - Move inference tests into ui/inference - Reduce ROOT_ENTRY_LIMIT
172 lines
7.3 KiB
Plaintext
172 lines
7.3 KiB
Plaintext
error[E0493]: destructor of `SafeStruct` cannot be evaluated at compile-time
|
|
--> $DIR/check-values-constraints.rs:64:7
|
|
|
|
|
LL | ..SafeStruct {
|
|
| _______^
|
|
LL | |
|
|
LL | | field1: SafeEnum::Variant3(WithDtor),
|
|
LL | | field2: SafeEnum::Variant1,
|
|
LL | | }
|
|
| |_____^ the destructor for this type cannot be evaluated in statics
|
|
LL | };
|
|
| - value is dropped here
|
|
|
|
error[E0010]: allocations are not allowed in statics
|
|
--> $DIR/check-values-constraints.rs:81:33
|
|
|
|
|
LL | static STATIC11: Vec<MyOwned> = vec![MyOwned];
|
|
| ^^^^^^^^^^^^^ allocation not allowed in statics
|
|
|
|
|
= note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info)
|
|
|
|
error[E0015]: cannot call non-const fn `slice::<impl [MyOwned]>::into_vec::<std::alloc::Global>` in statics
|
|
--> $DIR/check-values-constraints.rs:81:33
|
|
|
|
|
LL | static STATIC11: Vec<MyOwned> = vec![MyOwned];
|
|
| ^^^^^^^^^^^^^
|
|
|
|
|
= note: calls in statics are limited to constant functions, tuple structs and tuple variants
|
|
= note: consider wrapping this expression in `std::sync::LazyLock::new(|| ...)`
|
|
= note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info)
|
|
|
|
error[E0015]: cannot call non-const fn `<str as ToString>::to_string` in statics
|
|
--> $DIR/check-values-constraints.rs:92:38
|
|
|
|
|
LL | field2: SafeEnum::Variant4("str".to_string()),
|
|
| ^^^^^^^^^^^
|
|
|
|
|
= note: calls in statics are limited to constant functions, tuple structs and tuple variants
|
|
= note: consider wrapping this expression in `std::sync::LazyLock::new(|| ...)`
|
|
help: add `#![feature(const_trait_impl)]` to the crate attributes to enable
|
|
|
|
|
LL + #![feature(const_trait_impl)]
|
|
|
|
|
|
|
error[E0010]: allocations are not allowed in statics
|
|
--> $DIR/check-values-constraints.rs:96:5
|
|
|
|
|
LL | vec![MyOwned],
|
|
| ^^^^^^^^^^^^^ allocation not allowed in statics
|
|
|
|
|
= note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info)
|
|
|
|
error[E0015]: cannot call non-const fn `slice::<impl [MyOwned]>::into_vec::<std::alloc::Global>` in statics
|
|
--> $DIR/check-values-constraints.rs:96:5
|
|
|
|
|
LL | vec![MyOwned],
|
|
| ^^^^^^^^^^^^^
|
|
|
|
|
= note: calls in statics are limited to constant functions, tuple structs and tuple variants
|
|
= note: consider wrapping this expression in `std::sync::LazyLock::new(|| ...)`
|
|
= note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info)
|
|
|
|
error[E0010]: allocations are not allowed in statics
|
|
--> $DIR/check-values-constraints.rs:98:5
|
|
|
|
|
LL | vec![MyOwned],
|
|
| ^^^^^^^^^^^^^ allocation not allowed in statics
|
|
|
|
|
= note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info)
|
|
|
|
error[E0015]: cannot call non-const fn `slice::<impl [MyOwned]>::into_vec::<std::alloc::Global>` in statics
|
|
--> $DIR/check-values-constraints.rs:98:5
|
|
|
|
|
LL | vec![MyOwned],
|
|
| ^^^^^^^^^^^^^
|
|
|
|
|
= note: calls in statics are limited to constant functions, tuple structs and tuple variants
|
|
= note: consider wrapping this expression in `std::sync::LazyLock::new(|| ...)`
|
|
= note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info)
|
|
|
|
error[E0010]: allocations are not allowed in statics
|
|
--> $DIR/check-values-constraints.rs:103:6
|
|
|
|
|
LL | &vec![MyOwned],
|
|
| ^^^^^^^^^^^^^ allocation not allowed in statics
|
|
|
|
|
= note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info)
|
|
|
|
error[E0015]: cannot call non-const fn `slice::<impl [MyOwned]>::into_vec::<std::alloc::Global>` in statics
|
|
--> $DIR/check-values-constraints.rs:103:6
|
|
|
|
|
LL | &vec![MyOwned],
|
|
| ^^^^^^^^^^^^^
|
|
|
|
|
= note: calls in statics are limited to constant functions, tuple structs and tuple variants
|
|
= note: consider wrapping this expression in `std::sync::LazyLock::new(|| ...)`
|
|
= note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info)
|
|
|
|
error[E0010]: allocations are not allowed in statics
|
|
--> $DIR/check-values-constraints.rs:105:6
|
|
|
|
|
LL | &vec![MyOwned],
|
|
| ^^^^^^^^^^^^^ allocation not allowed in statics
|
|
|
|
|
= note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info)
|
|
|
|
error[E0015]: cannot call non-const fn `slice::<impl [MyOwned]>::into_vec::<std::alloc::Global>` in statics
|
|
--> $DIR/check-values-constraints.rs:105:6
|
|
|
|
|
LL | &vec![MyOwned],
|
|
| ^^^^^^^^^^^^^
|
|
|
|
|
= note: calls in statics are limited to constant functions, tuple structs and tuple variants
|
|
= note: consider wrapping this expression in `std::sync::LazyLock::new(|| ...)`
|
|
= note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info)
|
|
|
|
error[E0010]: allocations are not allowed in statics
|
|
--> $DIR/check-values-constraints.rs:111:31
|
|
|
|
|
LL | static STATIC19: Vec<isize> = vec![3];
|
|
| ^^^^^^^ allocation not allowed in statics
|
|
|
|
|
= note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info)
|
|
|
|
error[E0015]: cannot call non-const fn `slice::<impl [isize]>::into_vec::<std::alloc::Global>` in statics
|
|
--> $DIR/check-values-constraints.rs:111:31
|
|
|
|
|
LL | static STATIC19: Vec<isize> = vec![3];
|
|
| ^^^^^^^
|
|
|
|
|
= note: calls in statics are limited to constant functions, tuple structs and tuple variants
|
|
= note: consider wrapping this expression in `std::sync::LazyLock::new(|| ...)`
|
|
= note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info)
|
|
|
|
error[E0010]: allocations are not allowed in statics
|
|
--> $DIR/check-values-constraints.rs:117:32
|
|
|
|
|
LL | static x: Vec<isize> = vec![3];
|
|
| ^^^^^^^ allocation not allowed in statics
|
|
|
|
|
= note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info)
|
|
|
|
error[E0015]: cannot call non-const fn `slice::<impl [isize]>::into_vec::<std::alloc::Global>` in statics
|
|
--> $DIR/check-values-constraints.rs:117:32
|
|
|
|
|
LL | static x: Vec<isize> = vec![3];
|
|
| ^^^^^^^
|
|
|
|
|
= note: calls in statics are limited to constant functions, tuple structs and tuple variants
|
|
= note: consider wrapping this expression in `std::sync::LazyLock::new(|| ...)`
|
|
= note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info)
|
|
|
|
error[E0507]: cannot move out of static item `x`
|
|
--> $DIR/check-values-constraints.rs:119:9
|
|
|
|
|
LL | x
|
|
| ^ move occurs because `x` has type `Vec<isize>`, which does not implement the `Copy` trait
|
|
|
|
|
help: consider borrowing here
|
|
|
|
|
LL | &x
|
|
| +
|
|
help: consider cloning the value if the performance cost is acceptable
|
|
|
|
|
LL | x.clone()
|
|
| ++++++++
|
|
|
|
error: aborting due to 17 previous errors
|
|
|
|
Some errors have detailed explanations: E0010, E0015, E0493, E0507.
|
|
For more information about an error, try `rustc --explain E0010`.
|