-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
rustc: Use rust strings for failure arguments #14451
Conversation
begin_unwind(args, file, line); | ||
}, "{}", expr); | ||
|
||
loop {} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would this be better using the abort
intrinsic?
Updated to use |
Store(bcx, s, slot); | ||
|
||
// The type of C_str_slice is { i8*, i64 }, but the type of the &str is | ||
// %str_slice, so we do a bitcast here to the right type. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it possible to construct a %str_slice
directly?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not that I could find easily, but I'm also quite unfamiliar with trans so I'm likely doing something wrong here...
How much difference does this make for the empty application @bharrisau mentions in #14442? |
I'll build it and give it a go tonight. |
This avoids having to perform conversions from `*u8` to `&'static str` which can suck in a good deal of code. Closes rust-lang#14442
Or maybe I'll spend all night arguing with btrfs about what experimental means. |
Size is improved from 7576 bytes to 7000 bytes. The So this is definitely solving half the problem. Edit: ~1.3kB of the remaining size is from the failure strings and arguments (file names, etc). ~3.7kB is from secret_show and the string handling stuff. I'm not sure what is pulling in the |
This avoids having to perform conversions from `*u8` to `&'static str` which can suck in a good deal of code. Closes #14442
minor: Bump smol_str Should slightly improve compile times by it now not depending on serde (rowan and syntax in turn not either)
This PR enables the new ability to collapse `if` statements containing comments (without losing them) in Clippy sources, excluding tests and lintcheck, where the default behaviour (no collapsing in presence of comments) is preserved. To be applied after rust-lang#14231. When it is applied, rust-lang#14455 will be marked as ready for review, then rust-lang#14228 afterwards. changelog: none r? ghost
This avoids having to perform conversions from
*u8
to&'static str
which cansuck in a good deal of code.
Closes #14442