Make `bad_style` a silent alias for `nonstandard_style`
Now only `nonstandard_style` is suggested in `rustc -W help`, but `bad_style` will not produce a warning. Closes#41646.
r? @Manishearth
A few iterator-related improvements
- typeck: don't collect into a vector when unnecessary
- create only one vector when winnowing candidates
- change a cloning map to `into_iter`
Exit with code 101 on fatal codegen errors
Fixes#54992.
This PR installs a custom fatal error handler that prints the error from LLVM and exits with 101. There should be no visible change in the output from LLVM. This allows distinguishing a fatal LLVM error with a compilation error by exit code.
This PR also modifies the LLVM codegen backend to ICE instead of emitting a fatal error when encountering a LLVM worker thread panic for the same reason.
r? @cuviper
clarify pointer add/sub function safety concerns
Ralf Jung made the same changes to the offset functions' documentation
in commit fb089156. As add/sub just call offset, the same limitation
applies here, as well.
I did not copy the whole explanation ("In particular, the resulting pointer may *not* be used to access a different allocated object [...]") because I'd consider that as being too repetitive. The documentation of add/sub already refers to the offset function, so people interested in the details can look it up, there.
But changing 'an object' to 'the same object' is a small change which improves clarity a lot.
Add missing lifetime fragment specifier to error message.
A very minor issue, `lifetime` was missing from the error list.
I left `literal` in the list, even though it is unstable. It looks like it may stabilize soon anyways.
Cleanup rustc/session
- improve allocations
- improve common patterns
- use `to_owned` when no string conversion is needed
- move `const`s up to improve readability
- whitespace & formatting improvements
second round of refactorings for universes
A second round of (what I believe to be) "no functional change" refactorings, taken from my universes branch.
r? @scalexm
Instead, we talk about:
- creating the "next" universe
- universes "extending" one another
- and `u1.can_name(u2)`, meaning that `u1` contains all names from `u2`
submodules: update clippy from 9d337313 to 5afdf8b7
Should fix toolstate.
Changes:
````
fix for rustc master
mem_forget: fix syntax error in code sample
explicit_counter_loop fix#3308 false positive
new_ret_no_self test remove tool lints cfg flag
Added new_ret_no_self exception to clippy to pass dogfood tests
Removed new_ret_no_self tests from method.rs
new_ret_no_self correctly lint impl return
Removed unused variables
new_ret_no_self fix false positive for impl trait return with associated type self
new_ret_no_self corrected panic and added test stderr
new_ret_no_self added positive test cases
Fix some more `stutter` warnings
unused unit lint
Install Windows SDK 10.0 on travis
cmp_owned refactor
cmp_owned correct error message if rhs is deref
Add a comment reminding to update README if the default changes
Specify which categories are enabled by default
Only run markdown linter on linux
Move Travis Windows build to allowed failures
Add Travis windows build
Fix `doc_markdown` lints
Fix `stutter` lints
Fix `similar_names` warnings
cmp_owned current suggestion for multiple deref
cmp_owned add test for multiple dereference
Corrected single-character string constant used as pattern found in dogfood test
Fixes 3289, cmp_owned wording and false positive
````
update miri
This pulls in the changes in miri to actually enable validation. So, the rustc test suite will let us know if anything we cover regresses in that regard. :)
r? @oli-obk
Changes:
````
fix for rustc master
mem_forget: fix syntax error in code sample
explicit_counter_loop fix#3308 false positive
new_ret_no_self test remove tool lints cfg flag
Added new_ret_no_self exception to clippy to pass dogfood tests
Removed new_ret_no_self tests from method.rs
new_ret_no_self correctly lint impl return
Removed unused variables
new_ret_no_self fix false positive for impl trait return with associated type self
new_ret_no_self corrected panic and added test stderr
new_ret_no_self added positive test cases
Fix some more `stutter` warnings
unused unit lint
Install Windows SDK 10.0 on travis
cmp_owned refactor
cmp_owned correct error message if rhs is deref
Add a comment reminding to update README if the default changes
Specify which categories are enabled by default
Only run markdown linter on linux
Move Travis Windows build to allowed failures
Add Travis windows build
Fix `doc_markdown` lints
Fix `stutter` lints
Fix `similar_names` warnings
cmp_owned current suggestion for multiple deref
cmp_owned add test for multiple dereference
Corrected single-character string constant used as pattern found in dogfood test
Fixes 3289, cmp_owned wording and false positive
````
rustc: Allow targets to specify SIMD args are by-val
The upcoming SIMD support in the wasm target is unique from the other
platforms where it's either unconditionally available or not available,
there's no halfway where a subsection of the program can use it but no
other parts of the program can use it. In this world it's valid for wasm
SIMD args to always be passed by value and there's no need to pass them
by reference.
This commit adds a new custom target specification option
`simd_types_indirect` which defaults to `true`, but the wasm backend
disables this and sets it to `false`.
* `ui/lifetimes/lifetime-errors/ex3-both-anon-regions-both-are-structs-4`
and `ex3-both-anon-regions-both-are-structs-3`
* `ui/lint/lint-group-style` and `lint-group-nonstandard-style`
Cleanup rustc/driver
- improve/remove allocations
- simplify `profile::trace::cons*`
- don't sort `base` if it only has one element
- use `Cow<str>` where applicable
- use `unwrap_or_else` with function calls
- remove an explicit `return`, add an explicit `None`
- remove lifetimes from `const`s
- improve common patterns
- improve macro calls
- whitespace & formatting fixes
During review of the previous commit, @joshtriplett noticed that
the emphasis on 'the same' is unnecessary. For consistency, remove it
on the offset() functions, as well.
Ralf Jung made the same changes to the offset functions' documentation
in commit fb089156. As add/sub just call offset, the same limitation
applies here, as well.
Removed emphasis on review request by @joshtriplett