about summary refs log tree commit diff
path: root/src
AgeCommit message (Collapse)AuthorLines
2022-11-17Rollup merge of #104503 - notriddle:notriddle/where, r=GuillaumeGomezMatthias Krüger-4/+1
rustdoc: remove redundant font-color CSS on `.where` Before 7f6ce7dddd49f453da15bb4d586a5990985814d8, light-theme where clauses had color `#4E4C4C` while the main color was `#000`. One of that commit's simplifications made it so that everything used the same black.
2022-11-17Rollup merge of #104496 - djkoloski:dont_normalize_compiler_backtraces, ↵Matthias Krüger-16/+1
r=jackh726 Don't attempt to normalize compiler backtraces Backtraces can very significantly depending on environment and cause spurious test suite failures. Ensuring a proper failure-status should be sufficient to keep a crash properly documented. This caused a failure in Fuchsia's test suite CI due to an extra newline between "stack" and "error" appearing after normalization. cc ````@jackh726```` r? ````@tmandry````
2022-11-17Rollup merge of #104483 - oli-obk:santa-clauses-make-goals, r=compiler-errorsMatthias Krüger-2/+4
Convert predicates into Predicate in the Obligation constructor instead of having almost all callers do that. This reduces a bit of boilerplate, and also paves the way for my work towards https://github.com/rust-lang/compiler-team/issues/531 (as it makes it easier to accept both goals and clauses where right now it only accepts predicates).
2022-11-17Rollup merge of #104444 - chenyukang:yukang/fix-104390, r=compiler-errorsMatthias Krüger-0/+75
Fix ICE in in_operand for ty error Fixes #104390 By the way, moving some test cases to proper directory for tidy bless.
2022-11-17Rollup merge of #104433 - TaKO8Ki:fix-104392, r=estebankMatthias Krüger-0/+38
Fix `emit_unused_delims_expr` ICE Fixes #104392
2022-11-17Rollup merge of #104366 - GuillaumeGomez:simplify-settings-theme-choice, ↵Matthias Krüger-69/+79
r=notriddle Simplify settings theme choice I removed the storage changes from https://github.com/rust-lang/rust/pull/98765 and only kept the UI changes. You can test it [here](https://rustdoc.crud.net/imperio/simplify-settings-theme-choice/foo/index.html). Discussion about this still in progress [on zulip](https://rust-lang.zulipchat.com/#narrow/stream/266220-rustdoc/topic/Last.20part.20of.20settings.20simplification). r? ````@notriddle````
2022-11-17Rollup merge of #103852 - compiler-errors:rpitit-early-from-impl, r=lcnrMatthias Krüger-0/+32
Don't remap early-bound regions for return-position `impl Trait` in trait originating from `impl` long title :sweat: We don't want to remap early-bound regions that originate from the `impl`s themselves, since they have no corresponding region in the trait. Not sure if there's a better condition than checking if the EBR's def-id's parent is the impl -- maybe we should be checking if the region comes from the method or RPITIT... :shrug: r? types Fixes #103850
2022-11-17Auto merge of #104219 - bryangarza:async-track-caller-dup, r=eholkbors-0/+76
Support `#[track_caller]` on async fns Adds `#[track_caller]` to the generator that is created when we desugar the async fn. Fixes #78840 Open questions: - What is the performance impact of adding `#[track_caller]` to every `GenFuture`'s `poll(...)` function, even if it's unused (i.e., the parent span does not set `#[track_caller]`)? We might need to set it only conditionally, if the indirection causes overhead we don't want.
2022-11-17Auto merge of #104170 - cjgillot:hir-def-id, r=fee1-deadbors-143/+121
Record `LocalDefId` in HIR nodes instead of a side table This is part of an attempt to remove the `HirId -> LocalDefId` table from HIR. This attempt is a prerequisite to creation of `LocalDefId` after HIR lowering (https://github.com/rust-lang/rust/pull/96840), by controlling how `def_id` information is accessed. This first part adds the information to HIR nodes themselves instead of a table. The second part is https://github.com/rust-lang/rust/pull/103902 The third part will be to make `hir::Visitor::visit_fn` take a `LocalDefId` as last parameter. The fourth part will be to completely remove the side table.
2022-11-17Auto merge of #103138 - nnethercote:merge-BBs, r=bjorn3bors-4/+4
Merge basic blocks where possible when generating LLVM IR. r? `@ghost`
2022-11-16Auto merge of #102944 - nnethercote:ast-Lit-third-time-lucky, r=petrochenkovbors-121/+317
Use `token::Lit` in `ast::ExprKind::Lit`. Instead of `ast::Lit`. Literal lowering now happens at two different times. Expression literals are lowered when HIR is crated. Attribute literals are lowered during parsing. r? `@petrochenkov`
2022-11-16rustdoc: remove redundant font-color CSS on `.where`Michael Howell-4/+1
Before 7f6ce7dddd49f453da15bb4d586a5990985814d8, light-theme where clauses had color `#4E4C4C` while the main color was `#000`. One of that commit's simplifications made it so that everything used the same black.
2022-11-16Auto merge of #104456 - RalfJung:miri, r=RalfJungbors-335/+308
update Miri Not a huge sync, but there was a conflict and [josh](https://github.com/josh-project/josh/) seems to prefer those to be merged back ASAP.
2022-11-16Don't attempt to normalize compiler backtracesDavid Koloski-16/+1
Backtraces can very significantly depending on environment and cause test suite failures spuriously. Ensuring a proper failure-status should be sufficient to keep a crash properly documented.
2022-11-16ensure rand has its default features enabledRalf Jung-0/+2
2022-11-16Rollup merge of #104466 - notriddle:notriddle/crate-search-div-display, ↵Matthias Krüger-1/+0
r=GuillaumeGomez rustdoc: remove no-op CSS `#crate-search-div { display: inline-block }` `#crate-search-div` is nested directly below `.search-results-title`, which has `display: inline-flex`. This makes the crate-search-div a [flex item], which makes its display property irrelevant, because flex items have their display [blockified] in any case. [flex item]: https://developer.mozilla.org/en-US/docs/Glossary/Flex_Item [blockified]: https://www.w3.org/TR/css-flexbox-1/#flex-items
2022-11-16Rollup merge of #104462 - notriddle:notriddle/rightside-padding-right, ↵Matthias Krüger-1/+0
r=GuillaumeGomez rustdoc: remove pointless CSS `.rightside { padding-right: 2px }` This CSS was added in 34bd2b845b3acd84c5a9bddae3ff8081c19ec5e9, as `.since { padding-right: 2px }`, to prevent it from uncomfortably touching the srclink, which were separate floated elements. It was carried forward with 962c0a4ee59e3c1a2413e785694c9433ffd0a9e1 to the new `.rightside`, but its role was replaced with adding " • " between them. All it does now is pushes the element 2px away from the page's right margin. Removing this rule changes the page layout, but you have to look for it to notice it.
2022-11-16Rollup merge of #104459 - notriddle:notriddle/main-js-iife, r=GuillaumeGomezMatthias Krüger-4/+2
rustdoc: remove unused JS IIFE from main.js This [IIFE] made sense when it was added in f0683f98fa114cc4f9e795031f44be3eebb65790 and there was a local variable scoped to it, but now it only sets two globals, so it does nothing. [IIFE]: https://developer.mozilla.org/en-US/docs/Glossary/IIFE "immediately invoked function expression"
2022-11-16Rollup merge of #104335 - Nilstrieb:macrowo, r=compiler-errorsMatthias Krüger-0/+31
Only do parser recovery on retried macro matching Eager parser recovery can break macros, so we don't do it at first. But when we already know that the macro failed, we can retry it with recovery enabled to still emit useful diagnostics. Helps with #103534
2022-11-16Rollup merge of #104317 - RalfJung:ctfe-error-reporting, r=oli-obkMatthias Krüger-459/+609
cleanup and dedupe CTFE and Miri error reporting It looks like most of the time, this error raised from const_prop_lint is just redundant -- it duplicates the error reported when evaluating the const-eval query. This lets us make `ConstEvalErr` private to the const_eval module which I think is a good step. The Miri change mostly replaces a `match` by `if let`, and dedupes the "this error is impossible in Miri" checks. r? ``@oli-obk`` Fixes https://github.com/rust-lang/rust/issues/75461
2022-11-16Rollup merge of #104137 - StackDoubleFlow:err-lsc-unsupported, r=bjorn3Matthias Krüger-2/+2
Issue error when -C link-self-contained option is used on unsupported platforms The documentation was also updated to reflect this. I'm assuming the supported platforms are the same as initially written in [RELEASES.md](https://github.com/rust-lang/rust/blob/master/RELEASES.md#compiler-17). Fixes #103576
2022-11-16fix #104390, fix ICE in in_operand for ty erroryukang-0/+75
2022-11-16Convert predicates into Predicate in the Obligation constructorOli Scherer-2/+4
2022-11-16cleanup and dedupe CTFE and Miri error reportingRalf Jung-459/+609
2022-11-16Rollup merge of #104471 - scruss:patch-1, r=jyn514Matthias Krüger-1/+1
Update PROBLEMATIC_CONSTS in style.rs added 3735932941, since 3735927486 was already present.
2022-11-16Rollup merge of #104450 - andrewpollack:fix-fuchsia-compiler-docs, r=tmandryMatthias Krüger-6/+12
Fuchsia test suite script fix Fixing error from https://github.com/rust-lang/rust/pull/103842#discussion_r1022178201 r? ```@tmandry```
2022-11-16Rollup merge of #104425 - notriddle:notriddle/main-heading-justify-content, ↵Matthias Krüger-1/+17
r=GuillaumeGomez rustdoc: remove no-op CSS `.main-header { justify-content }` This rule was added in 152e8889052adaaa6c12652486292be34059713c to push the out-of-band content to the right while allowing it to line wrap when it got too big. The idea was that the justification rule would fill the space between the `<h1>` element and the `<div class="out-of-band">` element. A later commit, 3cb03cb34247383ffb67a017ae70134741e8c4da, flattened the in-band element into the `<h1>`, copying the `flex-grow` rule. This means the `<h1>` element now grows to fill the space, so there's no need to justify-content any more. This commit also adds a test case for this.
2022-11-16Rollup merge of #104424 - notriddle:notriddle/popover-font-size, ↵Matthias Krüger-2/+2
r=GuillaumeGomez rustdoc: remove no-op CSS `.popover { font-size: 1rem }` This rule was added in cc4f804829ae because the help popover inherited the font-size from the help button "?" icon. It doesn't inherit this any more, because it was moved from being nested inside the link to sharing a wrapper DIV with it.
2022-11-16Rollup merge of #104419 - Ayush1325:test-issue-30490, r=lcnrMatthias Krüger-1/+1
Fix test/ui/issues/issue-30490.rs Since the empty main is used for `not(unix)`, all the targets that will use this empty main will also need `allow(unused_imports)`. Originally part of https://github.com/rust-lang/rust/pull/100316 Signed-off-by: Ayush Singh <ayushsingh1325@gmail.com>
2022-11-16Rollup merge of #104348 - fmease:iat-vis-stab, r=cjgillotMatthias Krüger-1/+76
Respect visibility & stability of inherent associated types As discussed in #103621, this probably won't be the final location of the code that resolves inherent associated types. Still, I think it's valuable to push correctness fixes for this feature (in regards to visibility and stability). Let me know if I should write a translatable diagnostic instead and if I should move the tests to `privacy/` and `stability-attribute/` respectively. Fixes #104243. ````@rustbot```` label A-visibility F-inherent_associated_types r? ````@cjgillot```` (since you reviewed #103621, feel free to reroll though)
2022-11-16Rollup merge of #104193 - TaKO8Ki:fix-104142, r=cjgillotMatthias Krüger-0/+29
Shift no characters when using raw string literals Fixes #104142 Given the following code: ```rust fn main() { println!(r#"\'\'\'\'\'\'\'\'\'\'\'\'\'\'}"#); } ``` The current output is: ``` error: invalid format string: unmatched `}` found --> src/main.rs:2:59 | 2 | println!(r#"\'\'\'\'\'\'\'\'\'\'\'\'\'\'}"#); //~ ERROR invalid format string: unmatched `}` found | ^ unmatched `}` in format string | = note: if you intended to print `}`, you can escape it using `}}` error: could not compile `debug_playground` due to previous error ``` The output should look like: ``` error: invalid format string: unmatched `}` found --> src/main.rs:2:45 | 2 | println!(r#"\'\'\'\'\'\'\'\'\'\'\'\'\'\'}"#); //~ ERROR invalid format string: unmatched `}` found | ^ unmatched `}` in format string | = note: if you intended to print `}`, you can escape it using `}}` error: could not compile `debug_playground` due to previous error ``` This pull request fixes the wrong span for `invalid format string` error and also solves the ICE.
2022-11-16Rollup merge of #103484 - saschanaz:patch-2, r=ehussMatthias Krüger-4/+2
Add `rust` to `let_underscore_lock` example Currently https://doc.rust-lang.org/beta/rustc/lints/listing/deny-by-default.html#let-underscore-lock has no colored grammar and raw `{{produces}}` command is exposed.
2022-11-16allow fastrand dependencyRalf Jung-0/+1
2022-11-16Merge basic blocks where possible when generating LLVM IR.Nicholas Nethercote-4/+4
In `codegen_assert_terminator` we decide if a BB's successor is a candidate for merging, which requires that it be the only successor, and that it only have one predecessor. That result then gets passed down, and if it reaches `funclet_br` with the appropriate BB characteristics, then no `br` instruction is issued, a `MergingSucc::True` result is passed back, and the merging proceeds in `codegen_block`. The commit also adds `CachedLlbb`, a new type to help keep track of each BB that has been merged into its predecessor.
2022-11-16Auto merge of #104468 - weihanglo:update-cargo, r=weihanglobors-0/+0
Update cargo 5 commits in a3dfea71ca0c888a88111086898aa833c291d497..16b097879b6f117c8ae698aab054c87f26ff325e 2022-11-11 03:50:47 +0000 to 2022-11-14 23:28:16 +0000 - improve error message for cargo add/remove (rust-lang/cargo#11375) - Bump crate versions of `cargo-util` and `crates-io` (rust-lang/cargo#11369) - doc(changelog): suggestions of cargo fix are nightly only (rust-lang/cargo#11373) - Add warning when PATH env separator is in project path (rust-lang/cargo#11318) - Fix git2 safe-directory disable (rust-lang/cargo#11366) r? `@ghost`
2022-11-15Update PROBLEMATIC_CONSTS in style.rsStewart Russell-1/+1
added 3735932941, since 3735927486 was already present.
2022-11-16Update cargoWeihang Lo-0/+0
5 commits in a3dfea71ca0c888a88111086898aa833c291d497..16b097879b6f117c8ae698aab054c87f26ff325e 2022-11-11 03:50:47 +0000 to 2022-11-14 23:28:16 +0000 - improve error message for cargo add/remove (rust-lang/cargo#11375) - Bump crate versions of `cargo-util` and `crates-io` (rust-lang/cargo#11369) - doc(changelog): suggestions of cargo fix are nightly only (rust-lang/cargo#11373) - Add warning when PATH env separator is in project path (rust-lang/cargo#11318) - Fix git2 safe-directory disable (rust-lang/cargo#11366)
2022-11-15Auto merge of #102570 - cjgillot:deagg-debuginfo, r=oli-obkbors-41/+679
Perform simple scalar replacement of aggregates (SROA) MIR opt This is a re-open of https://github.com/rust-lang/rust/pull/85796 I copied the debuginfo implementation (first commit) from `@eddyb's` own SROA PR. This pass replaces plain field accesses by simple locals when possible. To be eligible, the replaced locals: - must not be enums or unions; - must not be used whole; - must not have their address taken. The storage and deinit statements are duplicated on each created local. cc `@tmiasko` who reviewed the former version of this PR.
2022-11-15rustdoc: remove no-op CSS `#crate-search-div { display: inline-block }`Michael Howell-1/+0
`#crate-search-div` is nested directly below `.search-results-title`, which has `display: inline-flex`. This makes the crate-search-div a [flex item], which makes its display property irrelevant, because flex items have their display [blockified] in any case. [flex item]: https://developer.mozilla.org/en-US/docs/Glossary/Flex_Item [blockified]: https://www.w3.org/TR/css-flexbox-1/#flex-items
2022-11-16Use `token::Lit` in `ast::ExprKind::Lit`.Nicholas Nethercote-187/+224
Instead of `ast::Lit`. Literal lowering now happens at two different times. Expression literals are lowered when HIR is crated. Attribute literals are lowered during parsing. This commit changes the language very slightly. Some programs that used to not compile now will compile. This is because some invalid literals that are removed by `cfg` or attribute macros will no longer trigger errors. See this comment for more details: https://github.com/rust-lang/rust/pull/102944#issuecomment-1277476773
2022-11-16Add some more bad suffix cases in a test.Nicholas Nethercote-17/+75
2022-11-16Add a test for different stages of lexer error reporting.Nicholas Nethercote-0/+101
2022-11-15rustdoc: remove pointless CSS `.rightside { padding-right: 2px }`Michael Howell-1/+0
This CSS was added in 34bd2b845b3acd84c5a9bddae3ff8081c19ec5e9, as `.since { padding-right: 2px }`, to prevent it from uncomfortably touching the srclink, which was a separate floated element. It was carried forward with 962c0a4ee59e3c1a2413e785694c9433ffd0a9e1 to the new `.rightside`, but its role was replaced with adding " &bull; " between them. All it does now is pushes the element 2px away from the page's right margin. Removing this rule changes the page layout, but you have to look for it to notice it.
2022-11-15Merge branch 'master' into patch-2Kagami Sascha Rosylight-17771/+37215
2022-11-15rustdoc: remove unused JS IIFE from main.jsMichael Howell-4/+2
This [IIFE] made sense when it was added in f0683f98fa114cc4f9e795031f44be3eebb65790 and there was a local variable scoped to it, but now it only sets two globals, so it does nothing. [IIFE]: https://developer.mozilla.org/en-US/docs/Glossary/IIFE "immediately invoked function expression"
2022-11-15Only do parser recovery on retried macro matchingNilstrieb-0/+31
This prevents issues with eager parser recovery during macro matching.
2022-11-15adjust josh pushing and remove ./miri toolchain updating the toolchain fileRalf Jung-52/+39
2022-11-15Mark test as panic=abort.Camille GILLOT-24/+10
2022-11-15Flatten aggregates into locals.Camille GILLOT-41/+693
2022-11-15Auto merge of #104054 - RalfJung:byte-provenance, r=oli-obkbors-88/+220
interpret: support for per-byte provenance Also factors the provenance map into its own module. The third commit does the same for the init mask. I can move it in a separate PR if you prefer. Fixes https://github.com/rust-lang/miri/issues/2181 r? `@oli-obk`