about summary refs log tree commit diff
path: root/src
AgeCommit message (Collapse)AuthorLines
2021-06-10Account for bad placeholder errors on consts/statics with trait objectsYuki Okushi-2/+22
2021-06-09Auto merge of #86003 - pnkfelix:issue-84297-revert-81238, r=Mark-Simulacrumbors-200/+27
Make copy/copy_nonoverlapping fn's again Make copy/copy_nonoverlapping fn's again, rather than intrinsics. This a short-term change to address issue #84297. It effectively reverts PRs #81167 #81238 (and part of #82967), #83091, and parts of #79684.
2021-06-09Auto merge of #86118 - spastorino:tait-soundness-bug, r=nikomatsakisbors-0/+103
Create different inference variables for different defining uses of TAITs Fixes #73481 r? `@nikomatsakis` cc `@oli-obk`
2021-06-09Auto merge of #86107 - Smittyvb:peephole-optim-eq-bool, r=wesleywiserbors-0/+166
Peephole optimize `x == false` and `x != true` This adds peephole optimizations to make `x == false`, `false == x`, `x != true`, and `true != x` get optimized to `!x` in the `instcombine` MIR pass. That pass currently handles `x == true` -> `x` already.
2021-06-09Rollup merge of #86159 - ehuss:update-cargo, r=ehussYuki Okushi-0/+0
Update cargo 11 commits in 0cecbd67323ca14a7eb6505900d0d7307b00355b..aa8b09297bb3156b849e73db48af4cd050492fe6 2021-06-01 20:09:13 +0000 to 2021-06-09 00:28:53 +0000 - Add `--prune` option for cargo-tree (rust-lang/cargo#9520) - Fix typo in gitignore docs. (rust-lang/cargo#9556) - Fix typos in command_prelude.rs (rust-lang/cargo#9552) - Make clippy happy (rust-lang/cargo#9551) - Remove some dead code. (rust-lang/cargo#9546) - Add additional test for CJK progress width (rust-lang/cargo#9515) - Pull in semver 1.0.3 'x' fix (rust-lang/cargo#9544) - Add some tracking issues to unstable docs. (rust-lang/cargo#9540) - Update documentation for include/exclude. (rust-lang/cargo#9538) - Bump mdbook version for contrib guide. (rust-lang/cargo#9534) - Replace deprecated `[replace]` references with `[patch]` (rust-lang/cargo#9533)
2021-06-09Rollup merge of #86158 - ehuss:update-books, r=ehussYuki Okushi-0/+0
Update books ## reference 4 commits in 9c68af3ce6ccca2395e1868addef26a0542e9ddd..8f598e2af6c25b4a7ee88ef6a8196d9b8ea50ca8 2021-05-24 09:53:32 -0700 to 2021-06-01 19:00:46 +0100 - Add crate and module to glossary. (rust-lang-nursery/reference#1016) - Fix type_length_limit example. (rust-lang-nursery/reference#1026) - Rearrange HRTB grammar. (rust-lang-nursery/reference#1011) - Revert "Temporarily remove pat_param." (rust-lang-nursery/reference#1010) ## rustc-dev-guide 6 commits in 50de7f0682adc5d95ce858fe6318d19b4b951553..c8da5bfd1c7c71d90ef1646f5e0a9f6609d5c78a 2021-05-20 15:02:20 +0200 to 2021-06-04 09:08:56 +0200 - Fix some links (rust-lang/rustc-dev-guide#1137) - explain Miri engine vs Miri-the-tool - Add more information about no_hash query modifier. (rust-lang/rustc-dev-guide#1133) - improve section introduction - not all tools require waiting for a nightly release before they can be fixed - Describe the difference of rustc_lint vs rustc_lint_defs.
2021-06-09Rollup merge of #86128 - jsha:render-impl-into-mod, r=GuillaumeGomezYuki Okushi-78/+86
Refactor: Extract render_summary from render_impl. This allows for a more readable straight-through logic in render_impl without need for a closure. I think this will make #85970 a bit more of a straightforward change. This is a pure refactoring. I've verified that the output of `x.py doc library/std` is byte-for-byte identical. r? `@GuillaumeGomez`
2021-06-09Rollup merge of #86124 - Aaron1011:ambig-macro-name, r=varkorYuki Okushi-2/+2
Include macro name in 'local ambiguity' error Currently, we only point at the span of the macro argument. When the macro call is itself generated by another macro, this can make it difficult or impossible to determine which macro is responsible for producing the error.
2021-06-09Rollup merge of #85982 - alexcrichton:doc-safe-wasm, r=jyn514Yuki Okushi-0/+7
Enable rustdoc to document safe wasm intrinsics This commit fixes an issue not found during #84988 where rustdoc is used to document cross-platform intrinsics but it was requiring that functions which use `#[target_feature]` are `unsafe` erroneously, even if they're WebAssembly specific. Rustdoc today, for example, already has a special case where it enables annotations like `#[target_feature(enable = "simd128")]` on platforms other than WebAssembly. The purpose of this commit is to relax the "require all `#[target_feature]` functions are `unsafe`" requirement for all targets whenever rustdoc is running, enabling all targets to fully document other targets, such as WebAssembly, where intrinsics functions aren't always `unsafe`.
2021-06-09Rollup merge of #85957 - BoxyUwU:rustdoc-const-generic-defaults, r=oli-obkYuki Okushi-10/+39
Display defaults on const params- rustdoc previously rustdoc would render this struct declaration: `pub struct Foo<const N: usize = 10>;` as: `pub struct Foo<const N: usize>;` this PR changes it to render correctly
2021-06-08Update cargoEric Huss-0/+0
2021-06-08Update booksEric Huss-0/+0
2021-06-08Update Mirihyd-dev-10/+9
2021-06-08Auto merge of #86127 - JohnTitor:rollup-0c6mp3j, r=JohnTitorbors-22/+37
Rollup of 11 pull requests Successful merges: - #85906 (Use `Iterator::find` instead of open-coding it) - #85951 (Update the documentation of `-C force-unwind-tables` for #83482) - #85985 (Clarify documentation of slice sorting methods) - #85989 (Remove rustfmt tests from top-level .gitattributes) - #86074 (Default panic message should print Box<dyn Any>) - #86078 (Type page font weight) - #86090 (:arrow_up: rust-analyzer) - #86095 (Search description codeblock) - #86096 (Comment out unused error codes and add description for E0316) - #86101 (Correct type signature in doc for Bound::as_mut) - #86103 (Remove lifetime hack) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2021-06-07Refactor: Extract render_summary from render_impl.Jacob Hoffman-Andrews-78/+86
This allows for a more readable straight-through logic in render_impl without need for a closure.
2021-06-08Rollup merge of #86096 - FabianWolff:ec-E0316, r=GuillaumeGomezYuki Okushi-0/+1
Comment out unused error codes and add description for E0316 I have added an extended description of `E0316` and commented out a bunch of unused error codes to make clear the fact that they are no longer in use. You can check for yourself with ```shell for ec in \ E0314 E0315 E0473 E0474 E0475 E0479 E0480 E0481 \ E0483 E0484 E0485 E0486 E0487 E0488 E0489 do if [ ! -z "`grep -r $ec compiler/* --exclude-dir=rustc_error_codes`" ] then echo $ec false fi done ``` i.e. these error codes appear nowhere in the compiler code and thus cannot be emitted. r? ```@GuillaumeGomez```
2021-06-08Rollup merge of #86095 - GuillaumeGomez:search-description-codeblock, r=jshaYuki Okushi-1/+6
Search description codeblock The codeblocks are not displayed correctly: ![Screenshot from 2021-06-07 11-11-53](https://user-images.githubusercontent.com/3050060/120991915-5fb05680-c782-11eb-9b32-973a64b1f631.png) This PR interprets the HTML correctly (and still prevent invalid HTML because of how it inserts it): ![Screenshot from 2021-06-07 11-12-00](https://user-images.githubusercontent.com/3050060/120991919-6048ed00-c782-11eb-8ac5-c3aa6508bc8b.png) r? ```@jsha```
2021-06-08Rollup merge of #86090 - lnicola:rust-analyzer-2021-06-07, r=jonas-schievinkYuki Okushi-15/+19
:arrow_up: rust-analyzer
2021-06-08Rollup merge of #86078 - GuillaumeGomez:type-page-font-weight, r=jshaYuki Okushi-2/+8
Type page font weight Fixes https://github.com/rust-lang/rust/issues/86069. r? ```@jsha```
2021-06-08Rollup merge of #86074 - reaganmcf:iss-86039, r=jyn514Yuki Okushi-2/+2
Default panic message should print Box<dyn Any> Closes #86039 Prior to this patch, the panic message from running the following code would be `thread 'main' panicked at 'Box<Any>'...` ```rust use std::panic::panic_any; fn main() { panic_any(42); } ``` This patch updates the phrasing to be more consistent. It now instead shows the following panic message: ``` thread 'main' panicked at 'Box<dyn Any>', ... ``` It's a very small fix 😄
2021-06-08Rollup merge of #85951 - hyd-dev:force-unwind-tables, r=steveklabnikYuki Okushi-2/+1
Update the documentation of `-C force-unwind-tables` for #83482 `panic=unwind` does not require `force-unwind-tables` to be "yes" anymore. I forgot to update this in #83482.
2021-06-07Include macro name in 'local ambiguity' errorAaron Hill-2/+2
Currently, we only point at the span of the macro argument. When the macro call is itself generated by another macro, this can make it difficult or impossible to determine which macro is responsible for producing the error.
2021-06-07Enable rustdoc to document safe wasm intrinsicsAlex Crichton-0/+7
This commit fixes an issue not found during #84988 where rustdoc is used to document cross-platform intrinsics but it was requiring that functions which use `#[target_feature]` are `unsafe` erroneously, even if they're WebAssembly specific. Rustdoc today, for example, already has a special case where it enables annotations like `#[target_feature(enable = "simd128")]` on platforms other than WebAssembly. The purpose of this commit is to relax the "require all `#[target_feature]` functions are `unsafe`" requirement for all targets whenever rustdoc is running, enabling all targets to fully document other targets, such as WebAssembly, where intrinsics functions aren't always `unsafe`.
2021-06-07Add more TAIT multiple defining uses test casesSantiago Pastorino-0/+72
2021-06-07Differentiate different defining uses of taits when they reference distinct ↵Santiago Pastorino-0/+31
generic parameters
2021-06-07Update RLSIgor Matuszewski-0/+0
This bumps racer to 2.1.48, which bumps rustc-ap-* crates to v722 in order to unbreak the toolstate.
2021-06-07Peephole optimize `x == false` and `x != true`Smitty-0/+166
2021-06-07Bless ui/where-clauses/where-for-self.rs testFabian Wolff-0/+1
2021-06-07Auto merge of #85891 - bjorn3:revert_merge_crate_disambiguator, ↵bors-92/+92
r=Mark-Simulacrum Revert "Merge CrateDisambiguator into StableCrateId" This reverts https://github.com/rust-lang/rust/pull/85804
2021-06-07Add test to ensure the result descripton is correctly handling codeblocksGuillaume Gomez-0/+5
2021-06-07Fix integration of codeblocks in search result descriptionGuillaume Gomez-1/+1
2021-06-07format versionEllen-1/+1
2021-06-07Revert "Update tests"bjorn3-68/+68
This reverts commit c76b1b031753fc08a18a3906d828683476c1e595.
2021-06-07Revert "Update mir opt tests"bjorn3-24/+24
This reverts commit e0e0cfa6492292d0b905b07a4ed727f4e1aefc80.
2021-06-07Rollup merge of #86025 - bjorn3:no_rpath_cfg_prefix, r=jackh726Yuki Okushi-2/+1
Remove the install prefix from the rpath set when using -Crpath It was broken anyway for rustup installs and nobody seems to have noticed. Fixes https://github.com/rust-lang/rust/issues/82392
2021-06-07Rollup merge of #85996 - jyn514:library-changes, r=Mark-SimulacrumYuki Okushi-3/+5
rustbuild: take changes to the standard library into account for `download-rustc` Previously, changing the standard library with `download-rustc = "if-unchanged"` would incorrectly reuse the cached compiler and standard library from CI, which was confusing and led to incorrect test failures or successes. r? `@Mark-Simulacrum`
2021-06-07Rollup merge of #84262 - camelid:sized-ice, r=estebankYuki Okushi-0/+58
Fix ICE during type layout when there's a `[type error]` Fixes #84108. Based on estebank's [comment], except I used `delay_span_bug` because it should work in more cases, and I think it expresses its intent more clearly. r? `@estebank` [comment]: https://github.com/rust-lang/rust/issues/84108#issuecomment-818916848
2021-06-07:arrow_up: rust-analyzerLaurențiu Nicola-15/+19
2021-06-07Auto merge of #85810 - bjorn3:further_driver_cleanup, r=varkorbors-18/+3
Driver improvements This PR contains a couple of cleanups for the driver and a few small improvements for the custom codegen backend interface. It also implements `--version` and `-Cpasses=list` support for custom codegen backends.
2021-06-06Update testsuite to match new panic msgReagan McFarland-2/+2
This patch fixes tests from failing that were matching on `Box<Any>`, which was the old panic message. Since the new panic message is `Box<dyn Any>`, the tests have been updated to match against this instead.
2021-06-07Rollup merge of #86058 - fee1-dead:E0121-improvements, r=jackh726Guillaume Gomez-22/+22
Remove `_` from E0121 diagnostic suggestions Fixes #86021.
2021-06-07Rollup merge of #86040 - GuillaumeGomez:search-result-display-height, r=jshaGuillaume Gomez-0/+2
Fix display for search results This fixes unwanted margin and font-weight coming from `.method`. Before: ![Screenshot from 2021-06-05 23-03-34](https://user-images.githubusercontent.com/3050060/120905486-9e46f380-c652-11eb-8008-6db6e0517ba3.png) after: ![Screenshot from 2021-06-05 23-05-02](https://user-images.githubusercontent.com/3050060/120905489-9edf8a00-c652-11eb-817d-f676f6ab7303.png) r? ``@jsha``
2021-06-07Rollup merge of #86010 - FabianWolff:ICE-parser, r=varkorGuillaume Gomez-0/+135
Fix two ICEs in the parser This pull request fixes #84104 and fixes #84148. The latter is caused by an invalid `assert_ne!()` in the parser, which I have simply removed because the error is then caught in another part of the parser. #84104 is somewhat more subtle and has to do with a suggestion to remove extraneous `<` characters; for instance: ```rust fn main() { foo::<Ty<<<i32>(); } ``` currently leads to ``` error: unmatched angle brackets --> unmatched-langle.rs:2:10 | 2 | foo::<Ty<<<i32>(); | ^^^ help: remove extra angle brackets ``` which is obviously wrong and stems from the fact that the code for issuing the above suggestion does not consider the possibility that there might be other tokens in between the opening angle brackets. In #84104, this has led to a span being generated that ends in the middle of a multi-byte character (because the code issuing the suggestion thought that it was only skipping over `<`, which are single-byte), causing an ICE.
2021-06-07Rollup merge of #84940 - jyn514:ninja, r=Mark-SimulacrumGuillaume Gomez-2/+7
Don't run sanity checks for `x.py setup` These requirements change as soon as the command finishes running, and `setup` doesn't build anything, so the check doesn't make sense. Previously, `x.py setup` would give hard errors if `ninja` and `cmake` were not installed, even if the new profile didn't require them. Fixes https://github.com/rust-lang/rust/issues/84938.
2021-06-07Rollup merge of #83433 - jyn514:cfg-bootstrap-macro, r=Mark-SimulacrumGuillaume Gomez-0/+7
Pass --cfg=bootstrap for proc macros built by stage0 Cargo has a bug where it ignores RUSTFLAGS when building proc macro crates (https://github.com/rust-lang/cargo/issues/4423). However, sometimes rustc_macro needs to have conditional compilation when there are breaking changes to the `libproc_macro` API (see for example #83363). Previously, this wasn't possible, because the crate couldn't tell the difference between stage 0 and stage 1. Another alternative is to unconditionally build rustc_macros with the master libstd instead of the beta one (i.e. use `--sysroot stage0-sysroot`), but that led to strange and maddening errors: ``` error[E0460]: found possibly newer version of crate `std` which `synstructure` depends on --> compiler/rustc_macros/src/lib.rs:5:5 | 5 | use synstructure::decl_derive; | ^^^^^^^^^^^^ | = note: perhaps that crate needs to be recompiled? = note: the following crate versions were found: crate `std`: /home/joshua/rustc2/build/x86_64-unknown-linux-gnu/stage0-sysroot/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd-b3602c301b71cc3d.rmeta crate `synstructure`: /home/joshua/rustc2/build/x86_64-unknown-linux-gnu/stage0-rustc/release/deps/libsynstructure-74ee66863479e972.rmeta error[E0460]: found possibly newer version of crate `std` which `proc_macro2` depends on --> /home/joshua/.local/lib/cargo/registry/src/github.com-1ecc6299db9ec823/tracing-attributes-0.1.13/src/lib.rs:90:5 | 90 | use proc_macro2::TokenStream; | ^^^^^^^^^^^ | = note: perhaps that crate needs to be recompiled? = note: the following crate versions were found: crate `std`: /home/joshua/rustc2/build/x86_64-unknown-linux-gnu/stage0-sysroot/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd-b3602c301b71cc3d.rmeta crate `proc_macro2`: /home/joshua/rustc2/build/x86_64-unknown-linux-gnu/stage0-rustc/release/deps/libproc_macro2-a83c1f01610c129e.rlib ``` r? `@Mark-Simulacrum` cc `@jhpratt`
2021-06-07Add test to check that font-weight is correctly set on type pageGuillaume Gomez-1/+7
2021-06-06Fix invalid weight for type pagesGuillaume Gomez-1/+1
2021-06-06Add variance-related information to lifetime error messagesAaron Hill-0/+53
2021-06-06Auto merge of #84995 - petrochenkov:tcollect, r=Aaron1011bors-0/+577
parser: Ensure that all nonterminals have tokens after parsing `parse_nonterminal` should always result in something with tokens. This requirement wasn't satisfied in two cases: - `stmt` nonterminal with expression statements (e.g. `0`, or `{}`, or `path + 1`) because `fn parse_stmt_without_recovery` forgot to propagate `force_collect` in some cases. - `expr` nonterminal with expressions with built-in attributes (e.g. `#[allow(warnings)] 0`) due to an incorrect optimization in `fn parse_expr_force_collect`, it assumed that all expressions starting with `#` have their tokens collected during parsing, but that's not true if all the attributes on that expression are built-in and inert. (Discovered when trying to implement eager `cfg` expansion for all attributes https://github.com/rust-lang/rust/pull/83824#issuecomment-817317170.) r? `@Aaron1011`
2021-06-06Auto merge of #86054 - JohnTitor:rollup-j40z7sm, r=JohnTitorbors-18/+46
Rollup of 8 pull requests Successful merges: - #85436 (Avoid cloning cache key) - #85772 (Preserve metadata w/ Solaris-like linkers.) - #85920 (Tweak wasm_base target spec to indicate linker is not GNU and update linker inferring logic for wasm-ld.) - #85930 (Update standard library for IntoIterator implementation of arrays ) - #85972 (Rustdoc html fixes) - #86028 (Drop an `if let` that will always succeed) - #86043 (don't clone attrs) - #86047 (Don't fire `invalid_doc_attributes` on `extern crate` items) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup