about summary refs log tree commit diff
path: root/src
AgeCommit message (Collapse)AuthorLines
2021-10-04Rollup merge of #89535 - notriddle:notriddle/error-index-generator-js, ↵Manish Goregaokar-34/+19
r=Mark-Simulacrum fix busted JavaScript in error index generator The old JavaScript didn't work. It filled the browser console with "e.previousElementSibling not defined" errors, because it didn't account for the example-wrap div that a newer version of rustdoc added. Additionally, it had copied versions of utility functions that had been optimized in rustdoc main.js. This version updates those.
2021-10-04Rollup merge of #89504 - Aaron1011:rpit-nll-static, r=nikomatsakisManish Goregaokar-211/+24
Don't suggest replacing region with 'static in NLL Fixes #73159 This is similar to #69350 - if the user didn't initially write out a 'static lifetime, adding 'static in response to a lifetime error is usually the wrong thing to do.
2021-10-04Rollup merge of #89482 - hkmatsumoto:patch-diagnostics, r=joshtriplettManish Goregaokar-12/+12
Follow the diagnostic output style guide Detected by #89455.
2021-10-04Rollup merge of #89426 - davidtwco:bootstrap-nix-toolchain-env-var, ↵Manish Goregaokar-12/+17
r=Mark-Simulacrum bootstrap: add config option for nix patching On NixOS systems, bootstrap will patch rustc used in bootstrapping after checking `/etc/os-release` (to confirm the current distribution is NixOS). However, when using Nix on a non-NixOS system, it can be desirable for bootstrap to patch rustc. In this commit, a `patch-binaries-for-nix` option is added to `config.toml`, which allows for user opt-in to bootstrap's Nix patching. r? ``@Mark-Simulacrum``
2021-10-04Rollup merge of #89423 - DevinR528:reachable-fields, r=NadrierilManish Goregaokar-3/+15
Fix ICE caused by non_exaustive_omitted_patterns struct lint fixes #89382 Add check that a list of `Pat`s is non empty to prevent ICE in `FnCtxt::lint_non_exhaustive_omitted_patterns`. Is related to #89374 and #89105
2021-10-04Rollup merge of #89364 - hkmatsumoto:encode-json-with-utf-8, r=Mark-SimulacrumManish Goregaokar-1/+1
rustdoc-json: Encode json files with UTF-8 Currently, `check_missing_items.py` malfunctions when the index contains some letters like emojis. Related to #89360.
2021-10-04Rollup merge of #88816 - dns2utf8:rustdoc_test_gui_2k_constants, ↵Manish Goregaokar-22/+44
r=GuillaumeGomez Rustdoc migrate to table so the gui can handle >2k constants Closes #88545. This PR adds a test for overlapping entries in the `item-table` https://github.com/rust-lang/rust/issues/88545 It currently includes the commit with the workaround from https://github.com/rust-lang/rust/pull/88776
2021-10-04Rollup merge of #88234 - hkmatsumoto:rustdoc-impls-for-primitive, r=jyn514Manish Goregaokar-3/+39
rustdoc-json: Don't ignore impls for primitive types Fix the issue discussed at [Zulip](https://rust-lang.zulipchat.com/#narrow/stream/266220-rustdoc/topic/.E2.9C.94.20Json.20output.20lacks.20some.20item.20which.20are.20supposed.20to.20be.20there) r? ``@jyn514``
2021-10-04Rollup merge of #89536 - RalfJung:miri, r=RalfJungJubilee-9/+7
update Miri Let's get the recent fixes and improvements shipped. r? ````@ghost````
2021-10-04Rollup merge of #89511 - lnicola:rust-analyzer-2021-10-04, r=lnicolaJubilee-17/+18
:arrow_up: rust-analyzer
2021-10-04Rollup merge of #89494 - FabianWolff:issue-84075, r=davidtwcoJubilee-34/+99
Deny `where` clauses on `auto` traits Fixes #84075.
2021-10-04Rollup merge of #89487 - FabianWolff:issue-89396, r=petrochenkovJubilee-0/+52
Try to recover from a `=>` -> `=` or `->` typo in a match arm Fixes #89396.
2021-10-04Rollup merge of #89480 - hameerabbasi:issue-89118-test, r=jackh726Jubilee-0/+95
Add test for issue 89118. This PR adds a test for issue 89118. Closes #89118.
2021-10-04Rollup merge of #89478 - zvavybir:master, r=jyn514Jubilee-3/+3
Fixed numerus of error message When there are redundant trait requirements and these are hidden, a message is generated by the following code snippet: `format!("{} redundant requirements hidden", count)` But if there is only a single hidden requirement, it will still print this message in plural instead of singular.
2021-10-04Rollup merge of #89474 - camelid:better-pass-name, r=jyn514Jubilee-14/+14
rustdoc: Improve doctest pass's name and module's name As the docs at the top of the file say, it is an overloaded pass and actually runs two lints.
2021-10-04Rollup merge of #89473 - FabianWolff:issue-89469, r=joshtriplettJubilee-0/+20
Fix extra `non_snake_case` warning for shorthand field bindings Fixes #89469. The problem is the innermost `if` condition here: https://github.com/rust-lang/rust/blob/d14731cb3ced8318d7fc83cbe838f0e7f2fb3b40/compiler/rustc_lint/src/nonstandard_style.rs#L435-L452 This code runs for every `PatKind::Binding`, so if a struct has multiple fields, say A and B, and both are bound in a pattern using shorthands, the call to `self.check_snake_case()` will indeed be skipped in the `check_pat()` call for `A`; but when `check_pat()` is called for `B`, the loop will still iterate over `A`, and `field.ident (= A) != ident (= B)` will be true. I have fixed this by only looking at non-shorthand bindings, and only the binding that `check_pat()` was actually called for.
2021-10-04Rollup merge of #89456 - cuviper:llvm-13, r=nikicJubilee-0/+0
Update to the final LLVM 13.0.0 release
2021-10-04Rollup merge of #89413 - matthewjasper:spec-marker-fix, r=nikomatsakisJubilee-0/+42
Correctly handle supertraits for min_specialization Supertraits of specialization markers could circumvent checks for min_specialization. Elaborating predicates prevents this. r? ````@nikomatsakis````
2021-10-04Rollup merge of #88090 - nbdd0121:inference, r=nikomatsakisJubilee-12/+66
Perform type inference in range pattern Fix #88074
2021-10-04Rollup merge of #87993 - kornelski:try_reserve_stable, r=joshtriplettJubilee-17/+0
Stabilize try_reserve Stabilization PR for the [`try_reserve` feature](https://github.com/rust-lang/rust/issues/48043#issuecomment-898040475).
2021-10-04Add tests for ensuring docblock headings.Mukund Lakshman-0/+29
2021-10-04heading_level: u32 -> heading_offset: HeadingOffsetMukund Lakshman-61/+88
2021-10-04No need to default offset since we always override it.Mukund Lakshman-40/+36
2021-10-04Change `Markdown(...)` to `Markdown { ... }`Mukund Lakshman-47/+108
2021-10-04Fix rustdoc test caseMichael Howell-12/+6
2021-10-04Re-bless src/test/ui/simdJubilee Young-84/+84
2021-10-04Rearrange test/ui/{simd,simd-intrinsic}Jubilee Young-0/+0
Mostly test/ui/simd-intrinsic -> test/ui/simd/intrinsic Intrinsics-per-se tests moved into that folder Repetitive names were cut short. Duplicate names given -pass annotations.
2021-10-04Use arrays over tuples in SIMD testsJubilee Young-222/+69
Simd([u8; 64]) is now valid for repr(simd), so simplify tests with huge tuples instead. This also found some completely untested code, so let's just ditch that.
2021-10-04Add documentationSamuel E. Moelius III-1/+33
2021-10-04Fix heading for methods on trait impls.Mukund Lakshman-1/+1
2021-10-04Make rustdoc not highlight `->` and `=>` as operatorsMichael Howell-6/+25
It was marking them up as `<span class="op">=</span><span class="op">&gt;</span>`, which is bloaty and wrong.
2021-10-04update MiriRalf Jung-9/+7
2021-10-04fix busted JavaScript in error index generatorMichael Howell-34/+19
The old JavaScript didn't work. It filled the browser console with "e.previousElementSibling not defined" errors, because it didn't account for the example-wrap div that a newer version of rustdoc added. Additionally, it had copied versions of utility functions that had been optimized in rustdoc main.js. This version updates those.
2021-10-04Ensure that `MaybeLiveLocals` works with simple sum-type assignmentsDylan MacKenzie-0/+32
2021-10-04Rollup merge of #89508 - jhpratt:stabilize-const_panic, r=joshtriplettJubilee-200/+87
Stabilize `const_panic` Closes #51999 FCP completed in #89006 ```@rustbot``` label +A-const-eval +A-const-fn +T-lang cc ```@oli-obk``` for review (not `r?`'ing as not on lang team)
2021-10-04Rollup merge of #89500 - FabianWolff:issue-87308, r=petrochenkovJubilee-0/+26
Fix ICE with buffered lint referring to AST node deleted by everybody_loops Fixes #87308. Note the following comment: https://github.com/rust-lang/rust/blob/08759c691e2e9799a3c6780ffdf910240ebd4a6b/compiler/rustc_lint/src/early.rs#L415-L417 As it turns out, this is not _always_ a bug, because `-Zunpretty=everybody_loops` causes a lot of AST nodes to be deleted, and thus some buffered lints will refer to non-existent node ids. To fix this, my changes simply ignore buffered lints if `-Zunpretty=everybody_loops` is enabled, which, from my understanding, shouldn't be a big issue because it only affects pretty-printing. Of course, a more elegant solution would only ignore buffered lints that actually point at deleted node ids, but I haven't figured out an easy way of achieving this. For the concrete example in #87308, the buffered lint is created [here](https://github.com/rust-lang/rust/blob/08759c691e2e9799a3c6780ffdf910240ebd4a6b/compiler/rustc_expand/src/mbe/macro_rules.rs#L145-L151) with the `lint_node_id` from [here](https://github.com/rust-lang/rust/blob/08759c691e2e9799a3c6780ffdf910240ebd4a6b/compiler/rustc_expand/src/mbe/macro_rules.rs#L319), i.e. it points at the macro _expansion_, which then gets deleted by `ReplaceBodyWithLoop` [here](https://github.com/rust-lang/rust/blob/08759c691e2e9799a3c6780ffdf910240ebd4a6b/compiler/rustc_interface/src/passes.rs#L377).
2021-10-04Rollup merge of #89483 - hkmatsumoto:patch-diagnostics-2, r=estebankJubilee-139/+139
Practice diagnostic message convention Detected by #89455. r? ```@estebank```
2021-10-04Rollup merge of #89453 - waywardmonkeys:consistent-supertrait-usage, r=nagisaJubilee-77/+77
Consistently use 'supertrait'. A subset of places referred to 'super-trait', so this changes them to all use 'supertrait'. This matches 'supertype' and some other usages. An exception is 'auto-trait' which is consistently used in that manner.
2021-10-04Rollup merge of #89447 - FabianWolff:issue-89388, r=davidtwcoJubilee-0/+15
Improve error message for missing angle brackets in `[_]::method` Fixes #89388.
2021-10-04Rollup merge of #89444 - notriddle:notriddle/contains-str, r=jyn514Jubilee-2/+2
rustdoc: use slice::contains instead of open-coding it
2021-10-04Rollup merge of #88451 - theo-lw:issue-87771, r=jackh726Jubilee-0/+13
Fix an ICE caused by type mismatch errors being ignored This PR fixes #87771. It turns out that the check on `compiler/rustc_typeck/src/check/demand.rs:148` leads to the ICE. I removed it because the early return in [`check_expr_assign`](https://github.com/theo-lw/rust/blob/dec7fc3ced5bc3c18d0e5d29921d087f93189cb8/compiler/rustc_typeck/src/check/expr.rs#L928) already prevents unnecessary error messages from the call to `check_expr_coercable_to_type`.
2021-10-04Rollup merge of #83655 - sebpop:arm64-outline-atomics, r=workingjubileeJubilee-0/+16
[aarch64] add target feature outline-atomics Enable outline-atomics by default as enabled in clang by the following commit https://reviews.llvm.org/rGc5e7e649d537067dec7111f3de1430d0fc8a4d11 Performance improves by several orders of magnitude when using the LSE instructions instead of the ARMv8.0 compatible load/store exclusive instructions. Tested on Graviton2 aarch64-linux with x.py build && x.py install && x.py test
2021-10-04Fix suggestion to borrow when casting from pointer to referenceFabian Wolff-6/+44
2021-10-04Add test for duplicated doc aliasesGuillaume Gomez-0/+33
2021-10-04Make `proc_macro_derive_resolution_fallback` a future-breakage lintAaron Hill-0/+72
When `cargo report future-incompatibilities` is stabilized (see #71249), this will cause dependencies that trigger this lint to be included in the report.
2021-10-04Don't rebuild GUI test crates every time you run test src/test/rustdoc-guiGuillaume Gomez-1/+1
2021-10-04Auto merge of #89489 - FabianWolff:issue-89485, r=oli-obkbors-0/+18
Fix unsound optimization with explicit variant discriminants Fixes #89485.
2021-10-04Stabilize try_reserveKornel-17/+0
2021-10-04librustdoc: Use correct heading levels.Mukund Lakshman-70/+99
- Avoid multiple <h1>s on a page. - The <h#> tags should follow a semantic hierarchy. - Cap at h6 (no h7)
2021-10-04Move generic error message to separate brancheskadmin-9/+17
This decomposes an error message in generic constants into more specific branches, for better readability.