about summary refs log tree commit diff
AgeCommit message (Collapse)AuthorLines
2022-12-02Avoid InferCtxt::build in suggest_missing_break_or_return_exprMichael Goulet-15/+39
2022-12-01Auto merge of #105140 - flip1995:clippyup, r=Manishearthbors-1914/+4245
Update Clippy r? `@Manishearth`
2022-12-01Auto merge of #105125 - matthiaskrgr:rollup-fr0snmj, r=matthiaskrgrbors-100/+156
Rollup of 4 pull requests Successful merges: - #105078 (Fix `expr_to_spanned_string` ICE) - #105087 (Extract llvm datalayout parsing out of spec module) - #105088 (rustdoc: remove redundant CSS `div.desc { display: block }`) - #105106 (Fix ICE from #105101) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2022-12-01Merge commit 'd822110d3b5625b9dc80ccc442e06fc3cc851d76' into clippyupPhilipp Krones-1914/+4245
2022-12-01Auto merge of #105003 - flba-eb:only_windows, r=Mark-Simulacrumbors-25/+3
Run Windows-only tests only on Windows This removes the need to maintain an ignore-list of all other OSs. See https://github.com/rust-lang/rust/pull/102305 for a similar change.
2022-12-01Ignore `gnu` systems (`windows-msvc` only)Florian Bartels-1/+2
2022-12-01Auto merge of #10010 - flip1995:rustup, r=flip1995bors-219/+230
Rustup r? `@ghost` changelog: none
2022-12-01Bump nightly version -> 2022-12-01Philipp Krones-1/+1
2022-12-01Merge remote-tracking branch 'upstream/master' into rustupPhilipp Krones-1957/+4286
2022-12-01Rollup merge of #105106 - jhpratt:issue-105101, r=TaKO8KiMatthias Krüger-1/+39
Fix ICE from #105101 Fixes #105101 Rather than comparing idents, compare spans, which should be unique to each variant.
2022-12-01Rollup merge of #105088 - notriddle:notriddle/search-results-div-desc, ↵Matthias Krüger-1/+0
r=GuillaumeGomez rustdoc: remove redundant CSS `div.desc { display: block }` DIV tags have block display by default. It is from when this rule used to target a SPAN tag, but became redundant in 4bd6748bb9b73c210558498070ae0b7ed8193ddf.
2022-12-01Rollup merge of #105087 - HKalbasi:master, r=eddybMatthias Krüger-90/+98
Extract llvm datalayout parsing out of spec module fix https://github.com/rust-lang/rust/pull/103693#discussion_r1033250846
2022-12-01Rollup merge of #105078 - TaKO8Ki:fix-105011, r=nnethercoteMatthias Krüger-8/+19
Fix `expr_to_spanned_string` ICE Fixes #105011
2022-12-01Auto merge of #104975 - JakobDegen:custom_mir_let, r=oli-obkbors-104/+454
`#![custom_mir]`: Various improvements This PR makes a bunch of improvements to `#![custom_mir]`. Ideally this would be 4 PRs, one for each commit, but those would take forever to get merged and be a pain to juggle. Should still be reviewed one commit at a time though. ### Commit 1: Support arbitrary `let` Before this change, all locals used in the body need to be declared at the top of the `mir!` invocation, which is rather annoying. We attempt to change that. Unfortunately, we still have the requirement that the output of the `mir!` macro must resolve, typecheck, etc. Because of that, we can't just accept this in the THIR -> MIR parser because something like ```rust { let x = 0; Goto(other) } other = { RET = x; Return() } ``` will fail to resolve. Instead, the implementation does macro shenanigans to find the let declarations and extract them as part of the `mir!` macro. That *works*, but it is fairly complicated and degrades debuginfo by quite a bit. Specifically, the spans for any statements and declarations that are affected by this are completely wrong. My guess is that this is a net improvement though. One way to recover some of the debuginfo would be to not support type annotations in the `let` statements, which would allow us to parse like `let $stmt:stmt`. That seems quite surprising though. ### Commit 2: Parse consts Reuses most of the const parsing from regular Mir building for building custom mir ### Commit 3: Parse statics Statics are slightly weird because the Mir primitive associated with them is a reference/pointer to them, so this is factored out separately. ### Commit 4: Fix some spans A bunch of the spans were non-ideal, so we adjust them to be much more helpful. r? `@oli-obk`
2022-12-01Auto merge of #10007 - Jarcho:issue_10005, r=giraffatebors-3/+11
Fix ICE in `result_large_err` with uninhabited enums fixes #10005 changelog: `result_large_err`: Fix ICE with uninhabited enums
2022-12-01Auto merge of #104861 - nnethercote:attr-cleanups, r=petrochenkovbors-307/+231
Attribute cleanups Best reviewed one commit at a time. r? `@petrochenkov`
2022-12-01Auto merge of #105095 - matthiaskrgr:rollup-9pu7vrx, r=matthiaskrgrbors-11/+206
Rollup of 9 pull requests Successful merges: - #103065 (rustdoc-json: Document and Test that args can be patterns.) - #104865 (Don't overwrite local changes when updating submodules) - #104895 (Avoid Invalid code suggested when encountering unsatisfied trait bounds in derive macro code) - #105063 (Rustdoc Json Tests: Don't assume that core::fmt::Debug will always have one item.) - #105064 (rustdoc: add comment to confusing CSS `main { min-width: 0 }`) - #105074 (Add Nicholas Bishop to `.mailmap`) - #105081 (Add a regression test for #104322) - #105086 (rustdoc: clean up sidebar link CSS) - #105091 (add Tshepang Mbambo to .mailmap) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2022-11-30Fix ICE in `result large_err` with uninhabited enumsJason Newcomb-3/+11
2022-12-01Auto merge of #104160 - Ayush1325:windows-args, r=m-ou-sebors-52/+62
Extract WStrUnits to sys_common::wstr This commit extracts WStrUnits from sys::windows::args to sys_common::wstr. This allows using the same structure for other targets which use wtf8 (example UEFI). This was originally a part of https://github.com/rust-lang/rust/pull/100316 Signed-off-by: Ayush Singh <ayushsingh1325@gmail.com>
2022-11-30Auto merge of #9943 - dswij:pr-9940, r=Jarchobors-15/+36
manual_let_else: keep macro call on suggestion blocks Closes #9940 changelog: [`manual_let_else`]: Do not expand macro calls on suggestions
2022-11-30Fix ICE from #105101Jacob Pratt-1/+39
2022-11-30Auto merge of #10001 - Jarcho:issue_9866, r=llogiqbors-14/+21
Fix ICE in `unused_rounding` fixes #9866 changelog: `unused_rounding`: Fix ICE when using the `_` separator
2022-11-30Auto merge of #9996 - Jarcho:issue_9906, r=Alexendoobors-7/+23
Fix `unnecessary_cast` suggestion when taking a reference fixes #9906 changelog: `unnecessary_cast`: Fix suggestion when taking a reference
2022-11-30Auto merge of #9997 - Jarcho:issue_9901, r=llogiqbors-6/+19
Don't lint `explicit_auto_deref` when the initial type is neither a reference, nor a receiver fixes #9901 fixes #9777 changelog: `explicit_auto_deref`: Don't lint when the initial value is neither a reference, nor a receiver
2022-11-30Rollup merge of #105091 - tshepang:mailmap, r=compiler-errorsMatthias Krüger-0/+1
add Tshepang Mbambo to .mailmap ... because my surname has changed ``` # before ❯ git shortlog --summary --email | rg Tshepang 326 Tshepang Lekhonkhobe <tshepang@gmail.com> 8 Tshepang Mbambo <tshepang@gmail.com> # after ❯ git shortlog --summary --email | rg Tshepang 334 Tshepang Mbambo <tshepang@gmail.com>
2022-11-30Rollup merge of #105086 - notriddle:notriddle/sidebar-css, r=GuillaumeGomezMatthias Krüger-7/+5
rustdoc: clean up sidebar link CSS Group `text-overflow: ellipses` along with `white-space: nowrap`. It makes no sense to try to apply it to links with `overflow-wrap: anywhere`, because it can't actually make ellipses when that's turned on. Simplify the selector for the 25rem left padding on sidebar links, to match up with the style for the container left padding that makes room for it.
2022-11-30Rollup merge of #105081 - weiznich:regression_test_for_104322, r=compiler-errorsMatthias Krüger-0/+80
Add a regression test for #104322 r? ``@compiler-errors``
2022-11-30Rollup merge of #105074 - nicholasbishop:bishop-mailmap, r=Mark-SimulacrumMatthias Krüger-0/+2
Add Nicholas Bishop to `.mailmap`
2022-11-30Rollup merge of #105064 - notriddle:notriddle/main-min-width, r=GuillaumeGomezMatthias Krüger-1/+1
rustdoc: add comment to confusing CSS `main { min-width: 0 }` This CSS was added in cad0fce2053d52b7ba04c458f4c124c8b5c6141e, but the reason why it was necessary was unclear. This comment makes it clear.
2022-11-30Rollup merge of #105063 - aDotInTheVoid:rdj-dont-assume-core, r=notriddleMatthias Krüger-1/+6
Rustdoc Json Tests: Don't assume that core::fmt::Debug will always have one item. See https://github.com/rust-lang/rust/pull/104525#issuecomment-1330837047 and https://github.com/rust-lang/rust/pull/104525#issuecomment-1331087852 for motivation. This still assumes that `fmt` is the first method, but thats alot less brittle than assuming it will be the only method. Sadly, we can't use a aux crate to insulate the tests from core changes, because core is special, so all we can do is try not to depend on things that may change.
2022-11-30Rollup merge of #104895 - chenyukang:yukang/fix-104884-serde, r=TaKO8KiMatthias Krüger-0/+97
Avoid Invalid code suggested when encountering unsatisfied trait bounds in derive macro code Fixes #104884
2022-11-30Rollup merge of #104865 - pratushrai0309:bootstrap, r=jyn514Matthias Krüger-2/+3
Don't overwrite local changes when updating submodules Fixes https://github.com/rust-lang/rust/issues/103485
2022-11-30Rollup merge of #103065 - aDotInTheVoid:rdj-arg-pattern, r=GuillaumeGomezMatthias Krüger-0/+11
rustdoc-json: Document and Test that args can be patterns.
2022-11-30Fix ICE in `unused_rounding`Jason Newcomb-14/+21
2022-11-30Extract llvm datalayout parsing out of spec modulehkalbasi-90/+98
2022-11-30add Tshepang Mbambo to .mailmapTshepang Mbambo-0/+1
2022-11-30Auto merge of #104940 - cjgillot:query-feed-simple, r=oli-obkbors-53/+298
Allow to feed a value in another query's cache Restricted version of https://github.com/rust-lang/rust/pull/96840 A query can create new definitions. If those definitions are created after HIR lowering, they do not appear in the initial HIR map, and information for them cannot be provided in the normal pull-based way. In order to make those definitions useful, we allow to feed values as query results for the newly created definition. The API is as follows: ```rust let feed = tcx.create_def(<parent def id>, <DefPathData>); // `feed` is a TyCtxtFeed<'tcx>. // Access the created definition. let def_id: LocalDefId = feed.def_id; // Assign `my_query(def_id) := my_value`. feed.my_query(my_value). ``` This PR keeps the consistency checks introduced by https://github.com/rust-lang/rust/pull/96840, even if they are not reachable. This allows to extend the behaviour later without forgetting them. cc `@oli-obk` `@spastorino`
2022-11-30Auto merge of #9987 - Jarcho:issue_9957, r=flip1995bors-43/+122
Don't cross contexts while building the suggestion for `redundant_closure_call` fixes #9957 changelog: `redundant_closure_call`: Don't cross macro contexts while building the suggestion
2022-11-30Add Nicholas Bishop to `.mailmap`Nicholas Bishop-0/+2
2022-11-30Don't lint `explicit_auto_deref` when the initial type is neither a ↵Jason Newcomb-6/+19
reference, nor a receiver
2022-11-30rustdoc: remove redundant CSS `div.desc { display: block }`Michael Howell-1/+0
DIV tags have block display by default. It is from when this rule used to target a SPAN tag, but became redundant in 4bd6748bb9b73c210558498070ae0b7ed8193ddf.
2022-11-30Fix `unnecessary_cast` suggestion when taking a referenceJason Newcomb-7/+23
2022-11-30Don't cross contexts while building the suggestion for `redundant_closure_call`Jason Newcomb-43/+122
2022-11-30rustdoc: clean up sidebar link CSSMichael Howell-7/+5
Group `text-overflow: ellipses` along with `white-space: nowrap`. It makes no sense to try to apply it to links with `overflow-wrap: anywhere`, because it can't actually make ellipses when that's turned on. Simplify the selector for the 25rem left padding on sidebar links, to match up with the style for the container left padding that makes room for it.
2022-11-30Auto merge of #99814 - aliemjay:patch-2, r=jackh726bors-3/+6
fix universe map in ifcx.instantiate_canonical_* Previously, `infcx.instantiate_canonical_*` maps the root universe in `canonical` into `ty::UniverseIndex::Root`, I think because it assumes it works with a fresh `infcx` but this is not true for the use cases in mir typeck. Now the root universe is mapped into `infcx.universe()`. I catched this accidentally while reviewing the code. I'm not sure if this is the right fix or if it is really a bug!
2022-11-30Add a regression test for #104322Georg Semmler-0/+80
2022-11-30Auto merge of #9989 - xFrednet:9986-move-safety-thingy, r=flip1995bors-8/+9
Move `unnecessary_unsafety_doc` to `pedantic` This lint was added in #9822. I like the idea, but also agree with #9986 as well. I think it should at least not be warn-by-default. This is one of these cases, where I'd like a group between pedantic and restriction. But I believe that users using `#![warn(clippy::pedantic)]` will know how to enable the lint if they disagree with it. --- Since the lint is new: changelog: none r? `@flip1995` since I'd suggest back porting this, the original PR was merged 16 days ago. Closes: #9986 (While it doesn't address everything, I believe that this is the best compromise)
2022-11-30Move `unnecessary_unsafety_doc` to `pedantic`xFrednet-8/+9
2022-11-30Auto merge of #104905 - compiler-errors:normalization-changes, r=spastorinobors-2/+2
Some initial normalization method changes 1. Rename `AtExt::normalize` to `QueryNormalizeExt::query_normalize` (using the `QueryNormalizer`) 2. Introduce `NormalizeExt::normalize` to replace `partially_normalize_associated_types_in` (using the `AssocTypeNormalizer`) 3. Rename `FnCtxt::normalize_associated_types_in` to `FnCtxt::normalize` 4. Remove some unused other normalization fns in `Inherited` and `FnCtxt` Also includes one drive-by where we're no longer creating a `FnCtxt` inside of `check_fn`, but passing it in. This means we don't need such weird `FnCtxt` construction logic. Stacked on top of #104835 for convenience. r? types
2022-11-30Auto merge of #104905 - compiler-errors:normalization-changes, r=spastorinobors-285/+159
Some initial normalization method changes 1. Rename `AtExt::normalize` to `QueryNormalizeExt::query_normalize` (using the `QueryNormalizer`) 2. Introduce `NormalizeExt::normalize` to replace `partially_normalize_associated_types_in` (using the `AssocTypeNormalizer`) 3. Rename `FnCtxt::normalize_associated_types_in` to `FnCtxt::normalize` 4. Remove some unused other normalization fns in `Inherited` and `FnCtxt` Also includes one drive-by where we're no longer creating a `FnCtxt` inside of `check_fn`, but passing it in. This means we don't need such weird `FnCtxt` construction logic. Stacked on top of #104835 for convenience. r? types