rustc panic due to reference passed instead of mut reference #61623
Labels
A-NLL
Area: Non-lexical lifetimes (NLL)
C-bug
Category: This is a bug.
I-ICE
Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
P-high
High priority
regression-from-stable-to-stable
Performance or correctness regression from one stable version to another.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
The following code causes a panic in rustc nightly and stable 2018 Edition:
I do not expect this to compile, as get_tree requires a mut reference, which is not provided by get. When changing get_tree to
fn get_tree(&self) -> &Tree;
, the code compiles properly.Backtrace
The text was updated successfully, but these errors were encountered: