about summary refs log tree commit diff
path: root/src
AgeCommit message (Collapse)AuthorLines
2021-03-23Slight visual improvements to warning boxes in the docsr00ster91-4/+13
2021-03-23Rollup merge of #83389 - njasm:test_rustdoc, r=jyn514Yuki Okushi-0/+3
add rust-analyzer rustc_private option in librustdoc Cargo.toml This addition will allow to have code completion while hacking rustdoc with rust-analyzer. more info: https://rust-analyzer.github.io/manual.html#rust-analyzer.rustcSource r? `@jyn514`
2021-03-23Rollup merge of #83385 - lnicola:rust-analyzer-2021-03-22, r=jonas-schievinkYuki Okushi-15/+15
:arrow_up: rust-analyzer
2021-03-23Rollup merge of #83384 - mark-i-m:rename-pat2018, r=joshtriplettYuki Okushi-6/+6
rename :pat2018 -> :pat2015 as requested by T-lang on zulip: https://rust-lang.zulipchat.com/#narrow/stream/213817-t-lang/topic/or.20patterns/near/231133873 No functional changes here... just renaming. r? `@nikomatsakis`
2021-03-23Rollup merge of #83356 - camelid:rustdoc-option-to-enum, r=GuillaumeGomezYuki Okushi-8/+11
rustdoc: Replace pair of `Option`s with an enum They are never both `None` or both `Some`, so it makes more sense to use an enum so that we "make impossible states impossible".
2021-03-23Rollup merge of #82732 - GuillaumeGomez:remove-theme-file, r=Nemo157Yuki Okushi-74/+83
Remove theme.js file Fixes #82616. The first commit moves the `theme.js` file into `main.js`, which requires to also run a small `.replace` on the `main.js` content. The second commit is just a small cleanup to centralize DOM ids. Since it removes a file from rustdoc output: cc `@rust-lang/docs-rs` cc `@jsha` r? `@jyn514`
2021-03-23Rollup merge of #80705 - tspiteri:italic-and-update-SourceCodePro, ↵Yuki Okushi-11/+25
r=GuillaumeGomez Update Source Code Pro and include italics Fixes #65502. #65665, a similar PR to this was merged but reverted because of https://github.com/rust-lang/rust/pull/65665#issuecomment-556860510. The issue in that comment is the upstream issue https://github.com/adobe-fonts/source-code-pro/issues/217 which should now be fixed in the upstream since [2.032R-ro/1.052R-it/1.012R-VAR release](https://github.com/adobe-fonts/source-code-pro/releases/tag/2.032R-ro/1.052R-it/1.012R-VAR), so I think this can now be merged. A couple of notes from the original PR: * Since this PR changes the font set, I think docs.rs would have to be updated if this PR is merged. * The fonts have a double extension (.ttf.woff); this is to keep the names consistent with the upstream font release which does that to distinguish these from the .otf.woff files (Source Code Pro otf renders poorly on older Windows system apps).
2021-03-22Auto merge of #79278 - mark-i-m:stabilize-or-pattern, r=nikomatsakisbors-739/+354
Stabilize or_patterns (RFC 2535, 2530, 2175) closes #54883 This PR stabilizes the or_patterns feature in Rust 1.53. This is blocked on the following (in order): - [x] The crater run in https://github.com/rust-lang/rust/pull/78935#issuecomment-731564021 - [x] The resolution of the unresolved questions and a second crater run (https://github.com/rust-lang/rust/pull/78935#issuecomment-735412705) - It looks like we will need to pursue some sort of edition-based transition for `:pat`. - [x] Nomination and discussion by T-lang - [x] Implement new behavior for `:pat` based on consensus (https://github.com/rust-lang/rust/pull/80100). - [ ] An FCP on stabilization EDIT: Stabilization report is in https://github.com/rust-lang/rust/pull/79278#issuecomment-772815177
2021-03-22missing newline at eofNelson J Morais-1/+1
2021-03-22add key rustc_private for package metadata for rust-analyzer in librustdocNelson J Morais-0/+3
2021-03-22:arrow_up: rust-analyzerLaurențiu Nicola-15/+15
2021-03-22rename :pat2018 -> :pat215mark-6/+6
2021-03-22Rollup merge of #83338 - asquared31415:asm-syntax-test-fix, r=Dylan-DPCDylan DPC-8/+9
Fix test for #82270 Fixes a test in #82270 to require the arm llvm component
2021-03-22Auto merge of #82855 - jyn514:no-temporaries, r=GuillaumeGomezbors-18/+30
Avoid temporary allocations in `render_assoc_item` `render_assoc_item` came up as very hot in a profile of rustdoc on `bevy`. This avoids some temporary allocations just to calculate the length of the header. This should be a strict improvement, since all string formatting was done twice before. cc #82845
2021-03-22Auto merge of #83360 - Dylan-DPC:rollup-17xulpv, r=Dylan-DPCbors-0/+37
Rollup of 9 pull requests Successful merges: - #80193 (stabilize `feature(osstring_ascii)`) - #80771 (Make NonNull::as_ref (and friends) return refs with unbound lifetimes) - #81607 (Implement TrustedLen and TrustedRandomAccess for Range<integer>, array::IntoIter, VecDequeue's iterators) - #82554 (Fix invalid slice access in String::retain) - #82686 (Move `std::sys::unix::platform` to `std::sys::unix::ext`) - #82771 (slice: Stabilize IterMut::as_slice.) - #83329 (Cleanup LLVM debuginfo module docs) - #83336 (Fix ICE with `use clippy::a::b;`) - #83350 (Download a more recent LLVM version if `src/version` is modified) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2021-03-22Rollup merge of #83350 - jyn514:llvm-version, r=Mark-SimulacrumDylan DPC-0/+2
Download a more recent LLVM version if `src/version` is modified When bumping the bootstrap version, the name of the generated LLVM shared object file is changed, even though it's the same contents as before. If bootstrap tries to use an older version, it will get linking errors: ``` Building rustdoc for stage1 (x86_64-unknown-linux-gnu) Compiling rustdoc-tool v0.0.0 (/home/joshua/rustc/src/tools/rustdoc) error: linking with `cc` failed: exit code: 1 | = note: "cc" "-Wl,--as-needed" ... lots of args ... = note: /usr/bin/ld: cannot find -lLLVM-12-rust-1.53.0-nightly clang: error: linker command failed with exit code 1 (use -v to see invocation) error: could not compile `rustdoc-tool` ``` Helps with https://github.com/rust-lang/rust/issues/81930.
2021-03-22Rollup merge of #83336 - camelid:tool-mod-ice, r=petrochenkovDylan DPC-0/+35
Fix ICE with `use clippy::a::b;` Fixes #83317.
2021-03-22Auto merge of #79846 - the8472:inplace-tra, r=m-ou-sebors-0/+14
Use TrustedRandomAccess for in-place iterators where possible This can speed up in-place iterators containing simple casts and transmutes from `Copy` types to any type of same size. `!Copy` types can't be optimized since `TrustedRandomAccess` isn't implemented for those iterators. ``` name on.b ns/iter o1.b ns/iter diff ns/iter diff % speedup vec::bench_transmute 20 (40000 MB/s) 12 (66666 MB/s) -8 -40.00% x 1.67 ```
2021-03-21disable debug assertions in codegen testThe8472-0/+1
2021-03-21rustdoc: Replace pair of `Option`s with an enumCamelid-8/+11
They are never both `None` or both `Some`, so it makes more sense to use an enum so that we "make impossible states impossible".
2021-03-21Fix ICE with `use clippy::a::b;`Camelid-0/+35
2021-03-21Update doc/reference submoduleNikita Popov-0/+0
In particular this pulls in an update to the auto-deref recursion_limit example, to no longer rely on the Freeze query.
2021-03-21Don't compute optimized PointerKind for unoptimized buildsNikita Popov-3/+3
This saves us both the Freeze/Unpin queries, and avoids placing noalias attributes, which have a compile-time impact on LLVM even in optnone builds (due to always_inline functions).
2021-03-21add codegen testThe8472-0/+13
2021-03-21Enable mutable noalias by default for LLVM 12Nikita Popov-3/+3
We don't have any known noalias bugs for LLVM 12 ... yet.
2021-03-21Don't consider !Unpin references as noaliasNikita Popov-0/+15
Such structures may contain self-references, in which case the same location may be accessible through a pointer that is not based-on the noalias pointer. This is still grey area as far as language semantics are concerned, but checking for !Unpin as an indicator for self-referential sturctures seems like a good approach for the meantime.
2021-03-21Download a more recent LLVM version if `src/version` is modifiedJoshua Nelson-0/+2
When bumping the bootstrap version, the name of the generated LLVM shared object file is changed, even though it's the same contents as before. If bootstrap tries to use an older version, it will get linking errors: ``` Building rustdoc for stage1 (x86_64-unknown-linux-gnu) Compiling rustdoc-tool v0.0.0 (/home/joshua/rustc/src/tools/rustdoc) error: linking with `cc` failed: exit code: 1 | = note: "cc" "-Wl,--as-needed" ... lots of args ... = note: /usr/bin/ld: cannot find -lLLVM-12-rust-1.53.0-nightly clang: error: linker command failed with exit code 1 (use -v to see invocation) error: could not compile `rustdoc-tool` ```
2021-03-21Auto merge of #83339 - Aaron1011:deep-recollect, r=petrochenkovbors-1/+34
Perform 'deep recollection' in test helper macros Currently, the print helper macro performs 'recollection' by doing `token_stream.into_iter().collect()`. However, this will not affect nonterminals that occur nested inside delimited groups, since the wrapping delimited group will be left untouched. This commit adds 'deep recollection', which recursively recollects every delimited group in the token stream. As with normal recollection, we only print out something if deep recollection results in a different stringified token stream. This is useful for catching bugs where we update the AST of a nonterminal (which affects pretty-printing), but do not update the attatched `TokenStream`
2021-03-21Perform 'deep recollection' in test helper macrosAaron Hill-1/+34
Currently, the print helper macro performs 'recollection' by doing `token_stream.into_iter().collect()`. However, this will not affect nonterminals that occur nested inside delimited groups, since the wrapping delimited group will be left untouched. This commit adds 'deep recollection', which recursively recollects every delimited group in the token stream. As with normal recollection, we only print out something if deep recollection results in a different stringified token stream. This is useful for catching bugs where we update the AST of a nonterminal (which affects pretty-printing), but do not update the attatched `TokenStream`
2021-03-20add arm llvm requirementasquared31415-8/+9
2021-03-21Auto merge of #83333 - Dylan-DPC:rollup-0rdt6sz, r=Dylan-DPCbors-94/+161
Rollup of 6 pull requests Successful merges: - #82707 (const_evaluatable_checked: Stop eagerly erroring in `is_const_evaluatable`) - #83040 (extract `ConstKind::Unevaluated` into a struct) - #83280 (Fix pluralization in keyword docs) - #83289 (Move some tests to more reasonable directories - 5) - #83306 (Extend `proc_macro_back_compat` lint to `js-sys`) - #83327 (Extend comment in `UsedLocals::visit_lhs`) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2021-03-21Rollup merge of #83306 - Aaron1011:js-sys-lint, r=petrochenkovDylan DPC-12/+60
Extend `proc_macro_back_compat` lint to `js-sys` With this PR, we now lint for all cases where we perform some kind of proc-macro back-compat hack. The `js-sys` had an internal fix made to properly handle `None`-delimited groups, so we need to manually check the version in the filename. As a result, we no longer apply the back-compat hack to cases where the version number is missing file the file path. This should not affect any users of the `crates.io` crate.
2021-03-21Rollup merge of #83289 - c410-f3r:tests-tests-tests, r=petrochenkovDylan DPC-2/+2
Move some tests to more reasonable directories - 5 cc #73494 Threshold is 0.95. Next time I promise I will take a look into the special/misclassified directories. - [issues/issue-23208.rs](https://github.com/rust-lang/rust/blob/master/src/test/ui/issues/issue-23208.rs) <sup>[issue](https://github.com/rust-lang/rust/issues/23208)</sup>: associated-types 0.951 - [weird-exprs.rs](https://github.com/rust-lang/rust/blob/master/src/test/ui/weird-exprs.rs) <sup>unknown</sup>: destructuring-assignment 0.958 - [issues/issue-1701.rs](https://github.com/rust-lang/rust/blob/master/src/test/ui/issues/issue-1701.rs) <sup>[issue](https://github.com/rust-lang/rust/issues/1701)</sup>: structs-enums 0.974 - [issues/issue-48508-aux.rs](https://github.com/rust-lang/rust/blob/master/src/test/ui/issues/issue-48508-aux.rs) <sup>[issue](https://github.com/rust-lang/rust/issues/48508)</sup>: numbers-arithmetic 0.991 - [fn_must_use.rs](https://github.com/rust-lang/rust/blob/master/src/test/ui/fn_must_use.rs) <sup>unknown</sup>: lint 1.000 - [mir_check_nonconst.rs](https://github.com/rust-lang/rust/blob/master/src/test/ui/mir_check_nonconst.rs) <sup>unknown</sup>: consts 1.002 - [issues/issue-52060.rs](https://github.com/rust-lang/rust/blob/master/src/test/ui/issues/issue-52060.rs) <sup>[issue](https://github.com/rust-lang/rust/issues/52060)</sup>: consts 1.017 - [issues/issue-45729-unsafe-in-generator.rs](https://github.com/rust-lang/rust/blob/master/src/test/ui/issues/issue-45729-unsafe-in-generator.rs) <sup>[issue](https://github.com/rust-lang/rust/issues/45729)</sup>: generator 1.024 - [issues/issue-10392.rs](https://github.com/rust-lang/rust/blob/master/src/test/ui/issues/issue-10392.rs) <sup>[issue](https://github.com/rust-lang/rust/issues/10392)</sup>: pattern 1.039 - [no-implicit-prelude.rs](https://github.com/rust-lang/rust/blob/master/src/test/ui/no-implicit-prelude.rs) <sup>unknown</sup>: resolve 1.071 - [issues/issue-68000-unicode-ident-after-missing-comma.rs](https://github.com/rust-lang/rust/blob/master/src/test/ui/issues/issue-68000-unicode-ident-after-missing-comma.rs) <sup>[issue](https://github.com/rust-lang/rust/issues/68000)</sup>: parser 1.079 - [shadow.rs](https://github.com/rust-lang/rust/blob/master/src/test/ui/shadow.rs) <sup>unknown</sup>: binding 1.099 - [issues/issue-65611.rs](https://github.com/rust-lang/rust/blob/master/src/test/ui/issues/issue-65611.rs) <sup>[issue](https://github.com/rust-lang/rust/issues/65611)</sup>: consts 1.139 - [concat-rpass.rs](https://github.com/rust-lang/rust/blob/master/src/test/ui/concat-rpass.rs) <sup>unknown</sup>: macros 1.194 - [issues/issue-31597.rs](https://github.com/rust-lang/rust/blob/master/src/test/ui/issues/issue-31597.rs) <sup>[issue](https://github.com/rust-lang/rust/issues/31597)</sup>: associated-types 1.195 - [issues/issue-78372.rs](https://github.com/rust-lang/rust/blob/master/src/test/ui/issues/issue-78372.rs) <sup>[issue](https://github.com/rust-lang/rust/issues/78372)</sup>: resolve 1.426 - [impl-trait-in-bindings-issue-73003.rs](https://github.com/rust-lang/rust/blob/master/src/test/ui/impl-trait-in-bindings-issue-73003.rs) <sup>[issue](https://github.com/rust-lang/rust/issues/73003)</sup>: impl-trait 1.471 - [impl-trait-in-bindings.rs](https://github.com/rust-lang/rust/blob/master/src/test/ui/impl-trait-in-bindings.rs) <sup>unknown</sup>: impl-trait 2.500 r? `@petrochenkov`
2021-03-21Rollup merge of #83040 - lcnr:unused-ct-substs, r=oli-obkDylan DPC-49/+59
extract `ConstKind::Unevaluated` into a struct r? `@oli-obk`
2021-03-21Rollup merge of #82707 - BoxyUwU:errooaaar, r=oli-obkDylan DPC-31/+40
const_evaluatable_checked: Stop eagerly erroring in `is_const_evaluatable` Fixes #82279 We don't want to be emitting errors inside of is_const_evaluatable because we may call this during selection where it should be able to fail silently There were two errors being emitted in `is_const_evaluatable`. The one causing the compile error in #82279 was inside the match arm for `FailureKind::MentionsParam` but I moved the other error being emitted too since it made things cleaner imo The `NotConstEvaluatable` enum \*should\* have a fourth variant for when we fail to evaluate a concrete const, e.g. `0 - 1` but that cant happen until #81339 cc `@oli-obk` `@lcnr` r? `@nikomatsakis`
2021-03-20bless mir-opt testslcnr-44/+44
2021-03-20update `const_eval_resolve`lcnr-5/+15
2021-03-20Bump to 1.53.0Mark Rousskov-1/+1
2021-03-20Move some tests to more reasonable directories - 5Caio-2/+2
2021-03-20Auto merge of #83271 - SparrowLii:simd_neg, r=Amanieubors-15/+36
Add simd_neg platform intrinsic Stdarch needs to add simd_neg to support the implementation of vneg neon instructions. Look [here](https://github.com/rust-lang/stdarch/pull/1087)
2021-03-19update testsmark-652/+320
2021-03-19librustdoc: or_patterns are stablemark-1/+1
2021-03-19remove unstable book chaptermark-36/+0
2021-03-19clippy: stabilize or_patterns lintmark-50/+33
2021-03-19Auto merge of #83308 - Dylan-DPC:rollup-p2j6sy8, r=Dylan-DPCbors-14/+89
Rollup of 8 pull requests Successful merges: - #79986 (Only build help popup when it's really needed) - #82570 (Add `as_str` method for split whitespace str iterators) - #83244 (Fix overflowing length in Vec<ZST> to VecDeque) - #83254 (Include output stream in `panic!()` documentation) - #83269 (Revert the second deprecation of collections::Bound) - #83277 (Mark early otherwise optimization unsound) - #83285 (Update LLVM to bring in SIMD updates for WebAssembly) - #83297 (Do not ICE on ty::Error as an error must already have been reported) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2021-03-19Rollup merge of #83297 - oli-obk:why_bug_today_if_you_can_delay_to_tomorrow, ↵Dylan DPC-0/+67
r=petrochenkov Do not ICE on ty::Error as an error must already have been reported fixes #83253
2021-03-19Rollup merge of #83285 - alexcrichton:wasm-simd-update, r=cuviperDylan DPC-0/+0
Update LLVM to bring in SIMD updates for WebAssembly This is a continuation of https://github.com/rust-lang/llvm-project/pull/96 to continue to make progress on updating Rust's support for SIMD intrinsics on WebAssembly to the latest version of the specification.
2021-03-19Rollup merge of #83277 - spastorino:early_otherwise-opt-unsound, r=oli-obkDylan DPC-2/+2
Mark early otherwise optimization unsound r? `@oli-obk` cc `@tmiasko` Related to #78496 and #82905 Should I also bump this one to level 3 or 4 or given that is unsound it doesn't matter?. Probably need to adjust some tests.
2021-03-19Rollup merge of #79986 - GuillaumeGomez:build-help-when-needed, r=Nemo157Dylan DPC-12/+20
Only build help popup when it's really needed When working on https://github.com/rust-lang/rust/pull/79985, I realized that the help popup was built even when it wasn't needed. This PR only makes the help popup to be built when required. r? `@jyn514`
2021-03-19Auto merge of #83201 - klensy:checkout-v2, r=pietroalbinibors-1/+1
use checkout@v2 in CI for master Updates CI workflow to use checkout@v2 from v1 (as other parts of CI) for master, plus slightly faster checkout as result compare v2 https://github.com/rust-lang-ci/rust/commit/2ccf06302c08d7d4911aad40e66a9a3ee731c6f9/checks/2113902859/logs and v1 logs https://github.com/rust-lang-ci/rust/commit/2ccf06302c08d7d4911aad40e66a9a3ee731c6f9/checks/2115229351/logs