-
Notifications
You must be signed in to change notification settings - Fork 13k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Segfault with let _x = "test" as &Any
#14366
Comments
LLDB says |
This works for me today, are you still seeing the problem? |
|
Hmm.
Maybe platform-specific? I'm on a mac, 10.9. |
On May 22nd I was obviously seeing it (on a Mac), as I authored this, but I too cannot reproduce today.
|
I'm on Linux:
Interesting bit: compiling this with debug symbols -> no crash:
The best I can convince lldb to tell me is this:
|
This correctly fails to compile now:
(though the repeated diagnostic is undesirable) And the correct version works: fn main() {
let _x = "test" as &::std::any::Any;
} |
feat: Pop a notification prompting the user to add a Cargo.toml of unlinked file to the linkedProjects cc rust-lang/rust-analyzer#13226 rust-lang/rust-analyzer#9661
Currently, rust-analyzer highlights the entire region when a `cfg` is inactive (e.g. `#[cfg(windows)]` on a Linux machine). However, unlinked files only highlight the first three characters of the file. This was introduced in rust-lang#8444, but users have repeatedly found themselves with no rust-analyzer support for a file and unsure why (see e.g. rust-lang#13226 and the intentionally prominent pop-up added in PR rust-lang#14366). (Anecdotally, we see this issue bite our users regularly, particularly people new to Rust.) Instead, highlight the entire inactive file, but mark it as all as unused. This allows users to hover and run the quickfix from any line. Whilst this is marginally more prominent, it's less invasive than a pop-up, and users do want to know why they're getting no rust-analyzer support in certain files.
…eykril fix: Highlight unlinked files consistently with inactive files Currently, rust-analyzer highlights the entire region when a `cfg` is inactive (e.g. `#[cfg(windows)]` on a Linux machine). However, unlinked files only highlight the first three characters of the file. This was introduced in rust-lang#8444, but users have repeatedly found themselves with no rust-analyzer support for a file and unsure why (see e.g. rust-lang#13226 and the intentionally prominent pop-up added in PR rust-lang#14366). (Anecdotally, we see this issue bite our users regularly, particularly people new to Rust.) Instead, highlight the entire inactive file, but mark it as all as unused. This allows users to hover and run the quickfix from any line. Whilst this is marginally more prominent, it's less invasive than a pop-up, and users do want to know why they're getting no rust-analyzer support in certain files. Before (note the subtle grey underline is only at the beginning of the first line): ![Screenshot 2024-06-05 at 5 41 17 PM](https://github.com/rust-lang/rust-analyzer/assets/70800/96f5d778-612e-4838-876d-35d9647fe2aa) After (user can hover and fix from any line): ![Screenshot 2024-06-05 at 5 42 13 PM](https://github.com/rust-lang/rust-analyzer/assets/70800/6af90b79-018c-42b9-b3c5-f497de2ccbff)
The following program segfaults when run (it compiles just fine):
Reproduced with
rustc 0.11.0-pre (22e2204 2014-05-21 23:31:27 -0700)
.The text was updated successfully, but these errors were encountered: