|
| 1 | +error[E0658]: cannot borrow here, since the borrowed element may contain interior mutability |
| 2 | + --> $DIR/arbitrary-self-from-method-substs-ice.rs:13:9 |
| 3 | + | |
| 4 | +LL | self.0 |
| 5 | + | ^^^^ |
| 6 | + | |
| 7 | + = note: see issue #80384 <https://github.com/rust-lang/rust/issues/80384> for more information |
| 8 | + = help: add `#![feature(const_refs_to_cell)]` to the crate attributes to enable |
| 9 | + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date |
| 10 | + |
| 11 | +error[E0015]: cannot call non-const fn `<R as Deref>::deref` in constant functions |
| 12 | + --> $DIR/arbitrary-self-from-method-substs-ice.rs:13:9 |
| 13 | + | |
| 14 | +LL | self.0 |
| 15 | + | ^^^^^^ |
| 16 | + | |
| 17 | + = note: calls in constant functions are limited to constant functions, tuple structs and tuple variants |
| 18 | +help: add `#![feature(const_trait_impl)]` to the crate attributes to enable |
| 19 | + | |
| 20 | +LL + #![feature(const_trait_impl)] |
| 21 | + | |
| 22 | + |
| 23 | +error[E0493]: destructor of `R` cannot be evaluated at compile-time |
| 24 | + --> $DIR/arbitrary-self-from-method-substs-ice.rs:10:43 |
| 25 | + | |
| 26 | +LL | const fn get<R: Deref<Target = Self>>(self: R) -> u32 { |
| 27 | + | ^^^^ the destructor for this type cannot be evaluated in constant functions |
| 28 | +... |
| 29 | +LL | } |
| 30 | + | - value is dropped here |
| 31 | + |
| 32 | +error[E0658]: `R` cannot be used as the type of `self` without the `arbitrary_self_types` feature |
| 33 | + --> $DIR/arbitrary-self-from-method-substs-ice.rs:10:49 |
| 34 | + | |
| 35 | +LL | const fn get<R: Deref<Target = Self>>(self: R) -> u32 { |
| 36 | + | ^ |
| 37 | + | |
| 38 | + = note: see issue #44874 <https://github.com/rust-lang/rust/issues/44874> for more information |
| 39 | + = help: add `#![feature(arbitrary_self_types)]` to the crate attributes to enable |
| 40 | + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date |
| 41 | + = help: consider changing to `self`, `&self`, `&mut self`, `self: Box<Self>`, `self: Rc<Self>`, `self: Arc<Self>`, or `self: Pin<P>` (where P is one of the previous types except `Self`) |
| 42 | + |
| 43 | +error: aborting due to 4 previous errors |
| 44 | + |
| 45 | +Some errors have detailed explanations: E0015, E0493, E0658. |
| 46 | +For more information about an error, try `rustc --explain E0015`. |
0 commit comments