about summary refs log tree commit diff
path: root/src
AgeCommit message (Collapse)AuthorLines
2022-03-01Demote Windows XP to no_std onlyEdwin Amsler-3/+3
Modify the tier 3 non-ARM targets to show the standard library will no longer build for these and there is no work being done to change that.
2022-03-01Auto merge of #94477 - matthiaskrgr:rollup-8h29qek, r=matthiaskrgrbors-112/+1322
Rollup of 3 pull requests Successful merges: - #94359 (Fix inconsistent symbol mangling of integers constants with -Zverbose) - #94465 (6 - Make more use of `let_chains`) - #94470 (:arrow_up: rust-analyzer) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2022-03-01Rollup merge of #94470 - lnicola:rust-analyzer-2022-03-01, r=lnicolaMatthias Krüger-16/+18
:arrow_up: rust-analyzer r? ``@ghost``
2022-03-01Rollup merge of #94359 - tmiasko:legacy-verbose-const, r=petrochenkovMatthias Krüger-96/+1304
Fix inconsistent symbol mangling of integers constants with -Zverbose The `PrettyPrinter` changes formatting of array size and integer constants based on `-Zverbose`, so its implementation cannot be used in legacy symbol mangling. Example symbol demangling before changes: ```console $ cat a.rs pub struct A<T>(T); impl A<[u8; 128]> { pub fn f() {} } $ rustc --crate-type=lib a.rs -Zverbose=n && nm -C ./liba.rlib 00000000 T a::A<[u8; 128]>::f $ rustc --crate-type=lib a.rs -Zverbose=y && nm -C ./liba.rlib 00000000 T a::A<[u8; Const { ty. usize, val. Value(Scalar(0x0000000000000080)) }]>::f ```
2022-03-01Auto merge of #94402 - erikdesjardins:revert-coldland, r=nagisabors-52/+19
Revert "Auto merge of #92419 - erikdesjardins:coldland, r=nagisa" Should fix (untested) #94390 Reopens #46515, #87055 r? `@ehuss`
2022-03-01Auto merge of #94471 - matthiaskrgr:rollup-ffz65qt, r=matthiaskrgrbors-8/+37
Rollup of 3 pull requests Successful merges: - #94438 (Check method input expressions once) - #94459 (Update cargo) - #94470 (:arrow_up: rust-analyzer) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2022-03-01Rollup merge of #94459 - jonhoo:bump-cargo, r=Dylan-DPCMatthias Krüger-0/+0
Update cargo 11 changes in d6cdde584a1f15ea086bae922e20fd27f7165431..3d6970d50e30e797b8e26b2b9b1bdf92dc381f34 2022-02-22 19:55:51 +0000 to 2022-02-28 19:29:07 +0000: - https://github.com/rust-lang/cargo/pull/10395 - https://github.com/rust-lang/cargo/pull/10425 - https://github.com/rust-lang/cargo/pull/10428 - https://github.com/rust-lang/cargo/pull/10388 - https://github.com/rust-lang/cargo/pull/10167 - https://github.com/rust-lang/cargo/pull/10429 - https://github.com/rust-lang/cargo/pull/10426 - https://github.com/rust-lang/cargo/pull/10372 - https://github.com/rust-lang/cargo/pull/10420 - https://github.com/rust-lang/cargo/pull/10416 - https://github.com/rust-lang/cargo/pull/10417
2022-03-01Rollup merge of #94438 - compiler-errors:check-method-inputs-once, r=davidtwcoMatthias Krüger-8/+37
Check method input expressions once If the user mistakenly forgets to wrap their method args in a tuple, then the compiler tries to check that types within the tuple match the expression args. This means we call `check_expr` once within this diagnostic code, so when we check the expr once again in `demand_compatible`, we attempt to apply expr adjustments twice, leading to ICEs. This PR attempts to fix this by skipping the expression type check in `demand_compatible` if we have detected an method arg mismatch at all. This does lead to a single UI test regressing slightly, due to a diagnostic disappearing, though I don't know if it is generally meaningful to even raise an type error after noting that the argument count is incorrect in a function call, since the user might be providing (in-context) meaningless expressions to the wrong method. I can adjust this to be a bit more targeted (to just skip checking exprs in `demand_compatible` in the tuple case) if this UI test regression is a problem. fixes #94334 cc #94291 Also drive-by fixup of `.node_type(expr.hir_id)` to `.expr_ty(expr)`, since that method exists.
2022-03-01:arrow_up: rust-analyzerLaurențiu Nicola-16/+18
2022-03-01Rollup merge of #93926 - PatchMixolydic:bugfix/must_use-on-exprs, r=cjgillotDylan DPC-162/+493
Lint against more useless `#[must_use]` attributes This expands the existing `#[must_use]` check in `unused_attributes` to lint against pretty much everything `#[must_use]` doesn't support. Fixes #93906.
2022-03-01Rollup merge of #93385 - CraftSpider:rustdoc-ty-fixes, r=camelidDylan DPC-42/+40
Rustdoc ty consistency fixes Changes to make rustdoc cleaning of ty more consistent with hir, and hopefully use it in more places. r? `@camelid`
2022-03-01Rollup merge of #91545 - compiler-errors:deref-suggestion-improvements, ↵Dylan DPC-0/+120
r=estebank Generalize "remove `&`" and "add `*`" suggestions to more than one deref Suggest removing more than one `&` and `&mut`, along with suggesting adding more than one `*` (or a combination of the two). r? `@estebank` (since you're experienced with these types of suggestions, feel free to reassign)
2022-02-28Auto merge of #94299 - oli-obk:stable_hash_ty, r=michaelwoeristerbors-4/+4
Caching the stable hash of Ty within itself Instead of computing stable hashes on types as needed, we compute it during interning. This way we can, when a hash is requested, just hash that hash, which is significantly faster than traversing the type itself. We only do this for incremental for now, as incremental is the only frequent user of stable hashing. As a next step we can try out * moving the hash and TypeFlags to Interner, so projections and regions get the same benefit (tho regions are not nested, so maybe that's not a good idea? Would be nice for dedup tho) * start comparing types via their stable hash instead of their address?
2022-02-28Fix inconsistent symbol mangling of integers constants with -ZverboseTomasz Miąsko-2/+472
The `PrettyPrinter` changes formatting of array size and integer constants based on `-Zverbose`, so its implementation cannot be used in legacy symbol mangling.
2022-02-28Update cargoJon Gjengset-0/+0
11 changes in d6cdde584a1f15ea086bae922e20fd27f7165431..3d6970d50e30e797b8e26b2b9b1bdf92dc381f34 2022-02-22 19:55:51 +0000 to 2022-02-28 19:29:07 +0000: - https://github.com/rust-lang/cargo/pull/10395 - https://github.com/rust-lang/cargo/pull/10425 - https://github.com/rust-lang/cargo/pull/10428 - https://github.com/rust-lang/cargo/pull/10388 - https://github.com/rust-lang/cargo/pull/10167 - https://github.com/rust-lang/cargo/pull/10429 - https://github.com/rust-lang/cargo/pull/10426 - https://github.com/rust-lang/cargo/pull/10372 - https://github.com/rust-lang/cargo/pull/10420 - https://github.com/rust-lang/cargo/pull/10416 - https://github.com/rust-lang/cargo/pull/10417
2022-02-28Rollup merge of #94449 - GuillaumeGomez:explanation-e0726, r=UrgauMatthias Krüger-1/+6
Add long explanation for E0726 This is the cleaned up version of #87655 with the missing fixes. Part of https://github.com/rust-lang/rust/issues/61137. r? `@Urgau`
2022-02-28Rollup merge of #94414 - DrMeepster:box_alloc_ice2, r=tmiaskoMatthias Krüger-6/+23
Fix ICE when using Box<T, A> with large A A sequel to #94043 that fixes #81270 and #92054 (duplicate).
2022-02-28Rollup merge of #94248 - compiler-errors:fix-while-loop-bad-delay, ↵Matthias Krüger-0/+13
r=petrochenkov Fix ICE when passing block to while-loop condition We were incorrectly delaying a bug when we passed _any_ block (that evaluated to `()`) to a while loop. This PR makes the check a bit more sophisticated. We should only suppress the error here in cases that are equivalent to those we find in #93574 (i.e. only while loop conditions that have destructuring assignment expressions in them). Fixes #93997 cc `@estebank` who added this code I would not be opposed to removing the delay-bug altogether, and just emitting this error always. I much prefer duplicate errors over no errors.
2022-02-28Tweak diagnosticsEsteban Kuber-106/+164
* Recover from invalid `'label: ` before block. * Make suggestion to enclose statements in a block multipart. * Point at `match`, `while`, `loop` and `unsafe` keywords when failing to parse their expression. * Do not suggest `{ ; }`. * Do not suggest `|` when very unlikely to be what was wanted (in `let` statements).
2022-02-28Update ui test with the add of E0726 explanationGuillaume Gomez-1/+6
2022-02-28Auto merge of #94447 - matthiaskrgr:rollup-d8rj2xv, r=matthiaskrgrbors-2/+11
Rollup of 5 pull requests Successful merges: - #89793 (Add `slice::{from_ptr_range, from_mut_ptr_range} `) - #92642 (Update search location from a relative path to absolute) - #93389 (regression for issue 90847) - #93413 (Fix broken link from rustdoc docs to ayu theme) - #94365 (Fix MinGW target detection in raw-dylib) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2022-02-28Rollup merge of #93413 - lsimons:patch-1, r=Dylan-DPCMatthias Krüger-1/+1
Fix broken link from rustdoc docs to ayu theme
2022-02-28Rollup merge of #93389 - cameron1024:issue-90847-regression, r=Mark-SimulacrumMatthias Krüger-0/+9
regression for issue 90847 Adds a regression test for issue #90847
2022-02-28Rollup merge of #92642 - avborhanian:master, r=Dylan-DPCMatthias Krüger-1/+1
Update search location from a relative path to absolute This should address issue #90311.
2022-02-28Auto merge of #94216 - psumbera:sparc64-abi-fix2, r=nagisabors-0/+20
more complete sparc64 ABI fix for aggregates with floating point members Previous fix didn't handle nested structures at all.
2022-02-28Auto merge of #94427 - cjgillot:inline-fresh-expn, r=oli-obkbors-472/+478
Only create a single expansion for each inline integration. The inlining integrator used to create one expansion for each span from the callee body. This PR reverses the logic to create a single expansion for the whole call, which is more consistent with how macro expansions work for macros. This should remove the large memory regression in #91743.
2022-02-28Auto merge of #94158 - erikdesjardins:more-more-noundef, r=nikicbors-4/+83
Apply noundef metadata to loads of types that do not permit raw init This matches the noundef attributes we apply on arguments/return types. Fixes (partially) #74378.
2022-02-27expadn abi check + condese & fix testsDrMeepster-7/+2
2022-02-27update vec-shrink-panik test to allow panic_no_unwind in landingpadsErik Desjardins-0/+19
2022-02-27Revert "Auto merge of #92419 - erikdesjardins:coldland, r=nagisa"Erik Desjardins-52/+0
This reverts commit 4f49627c6fe2a32d1fed6310466bb0e1c535c0c0, reversing changes made to 028c6f1454787c068ff5117e9000a1de4fd98374.
2022-02-27only check method inputs onceMichael Goulet-8/+37
2022-02-28Auto merge of #94437 - RalfJung:miri, r=RalfJungbors-7/+9
update Miri Fixes https://github.com/rust-lang/rust/issues/94318 r? `@ghost`
2022-02-27fix ICE when passing empty block to while-loop conditionMichael Goulet-0/+13
2022-02-27update MiriRalf Jung-7/+9
2022-02-28Auto merge of #94431 - matthiaskrgr:rollup-1jsj0wu, r=matthiaskrgrbors-8/+53
Rollup of 7 pull requests Successful merges: - #94396 (1 - Make more use of `let_chains`) - #94397 (Document that pre-expansion lint passes are softly deprecated) - #94399 (Add test for #79465 to prevent regression) - #94409 (avoid rebuilding bootstrap when PATH changes) - #94415 (Use the first codegen backend in the config.toml as default) - #94417 (Fix duplicated impl links) - #94420 (3 - Make more use of `let_chains`) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2022-02-27Make deref suggestion betterMichael Goulet-0/+120
2022-02-27Auto merge of #94157 - erikdesjardins:more-noundef, r=nikicbors-8/+58
Apply noundef attribute to all scalar types which do not permit raw init Beyond `&`/`&mut`/`Box`, this covers `char`, enum discriminants, `NonZero*`, etc. All such types currently cause a Miri error if left uninitialized, and an `invalid_value` lint in cases like `mem::uninitialized::<char>()`. Note that this _does not_ change whether or not it is UB for `u64` (or other integer types with no invalid values) to be undef. Fixes (partially) #74378. r? `@ghost` (blocked on #94127) `@rustbot` label S-blocked
2022-02-27Rollup merge of #94417 - GuillaumeGomez:fix-duplicated-impl-links, r=notriddleMatthias Krüger-7/+30
Fix duplicated impl links Fixes #78701. The problem is that the blanket impl has the same ID as the other impl, except that we don't derive IDs when we generate the sidebar. We now do. r? ``@notriddle``
2022-02-27Rollup merge of #94415 - bjorn3:cfg_default_backend, r=Mark-SimulacrumMatthias Krüger-0/+4
Use the first codegen backend in the config.toml as default It is currently hard coded to llvm if enabled and cranelift otherwise. This made some sense when cranelift was the only alternative codegen backend. Since the introduction of the gcc backend this doesn't make much sense anymore. Before this PR bootstrapping rustc using a backend other than llvm or cranelift required changing the source of rustc_interface. With this PR it becomes a matter of putting the right backend as first enabled backend in config.toml. cc ```@antoyo```
2022-02-27Rollup merge of #94409 - RalfJung:path, r=Mark-SimulacrumMatthias Krüger-1/+1
avoid rebuilding bootstrap when PATH changes Fixes https://github.com/rust-lang/rust/issues/94408 r? ```@Mark-Simulacrum```
2022-02-27Rollup merge of #94399 - GuillaumeGomez:regression-test-79465, r=matthiaskrgrMatthias Krüger-0/+18
Add test for #79465 to prevent regression Fixes #79465. Like this we will be able to close the issue. r? ````@matthiaskrgr````
2022-02-27make pgo-branch-weights test not dependent on argument attributesErik Desjardins-2/+2
2022-02-27Only create a single expansion for each inline integration.Camille GILLOT-472/+478
2022-02-27Auto merge of #94412 - scottmcm:cfg-out-miri-from-swap, r=oli-obkbors-0/+27
For MIRI, cfg out the swap vectorization logic from 94212 Because of #69488 the swap logic from #94212 doesn't currently work in MIRI. Copying in smaller pieces is probably much worse for its performance anyway, so it'd probably rather just use the simple path regardless. Part of #94371, though another PR will be needed for the CTFE aspect. r? `@oli-obk` cc `@RalfJung`
2022-02-27Apply noundef metadata to loads of types that do not permit raw initErik Desjardins-4/+83
This matches the noundef attributes we apply on arguments/return types.
2022-02-27Lint against more useless `#[must_use]` attributesRuby Lazuli-162/+493
This expands the existing `#[must_use]` check in `unused_attributes` to lint against pretty much everything `#[must_use]` doesn't support. Fixes #93906.
2022-02-27Add test to ensure that links to impls are correctly generatedGuillaume Gomez-0/+20
2022-02-27Correctly generate links in the sidebar for implsGuillaume Gomez-7/+10
2022-02-27Use the first codegen backend in the config.toml as defaultbjorn3-0/+4
It is currently hard coded to llvm if enabled and cranelift otherwise. This made some sense when cranelift was the only alternative codegen backend. Since the introduction of the gcc backend this doesn't make much sense anymore. Before this PR bootstrapping rustc using a backend other than llvm or cranelift required changing the source of rustc_interface. With this PR it becomes a matter of putting the right backend as first enabled backend in config.toml.
2022-02-27fix box icing when it has aggregate abiDrMeepster-0/+22