about summary refs log tree commit diff
path: root/src
AgeCommit message (Collapse)AuthorLines
2021-04-07Auto merge of #82451 - jyn514:defaults, r=Mark-Simulacrumbors-27/+39
Cleanup option parsing and config.toml.example - Add an assertion that `link-shared = true` when `thin-lto = true`. Previously, link-shared would be silently overwritten. - Get rid of `Option<bool>` in bootstrap/config.rs. Set defaults immediately instead of delaying until later in bootstrap. This makes it easier to find what the default value is. - Remove redundant `config.x = false` when the default was already false - Set defaults for `bindir` in `default_opts()` instead of `parse()` - Update `download-ci-llvm = if-supported` option to match bootstrap.py - Remove redundant check for link_shared. Previously, it was checked twice. - Update various options in config.toml.example to their defaults. Previously, some options showed an example value instead of the default value. - Fix incorrect defaults in config.toml.example + `use-libcxx` defaults to false + Add missing `check-stage = 0` + Update several defaults to be conditional (e.g. `if incremental { 10 } else { 100 }`) - Remove redundant defaults in prose - Use the same comment for the default and target-dependent `musl-root` - Fix typos - Link to `cc_detect` for `cc` and `cxx`, since the logic is ... complicated. - Update more defaults to better reflect how they actually get set - Remove ignored `gpg-password-file` option This stopped being used in 7704d35, but was never removed from config.toml. - Remove unused flags from `config.toml` + Disallow `infodir` and `localstatedir` in `config.toml` + Allow the flags in `./configure`, but give a warning that they will be ignored. + Fix incorrect comment that `datadir` will be ignored. Example output: ``` $ ./configure --set install.infodir=xxx configure: processing command line configure: configure: install.infodir := xxx configure: build.configure-args := ['--set', 'install.infodir=xxx'] warning: infodir will be ignored configure: configure: writing `config.toml` in current directory configure: configure: run `python /home/joshua/rustc3/x.py --help` configure: ``` - Update CHANGELOG cc https://rust-lang.zulipchat.com/#narrow/stream/131828-t-compiler/topic/bootstrap.20defaults
2021-04-07Cleanup option parsing and config.toml.exampleJoshua Nelson-27/+39
- Add an assertion that `link-shared = true` when `thin-lto = true`. Previously, link-shared would be silently overwritten. - Get rid of `Option<bool>` in bootstrap/config.rs. Set defaults immediately instead of delaying until later in bootstrap. This makes it easier to find what the default value is. - Remove redundant `config.x = false` when the default was already false - Set defaults for `bindir` in `default_opts()` instead of `parse()` - Update `download-ci-llvm = if-supported` option to match bootstrap.py - Remove redundant check for link_shared. Previously, it was checked twice. - Update various options in config.toml.example to their defaults. Previously, some options showed an example value instead of the default value. - Fix incorrect defaults in config.toml.example + `use-libcxx` defaults to false + Add missing `check-stage = 0` + Update several defaults to be conditional (e.g. `if incremental { 10 } else { 100 }`) - Remove redundant defaults in prose - Use the same comment for the default and target-dependent `musl-root` - Fix typos - Link to `cc_detect` for `cc` and `cxx`, since the logic is ... complicated. - Update more defaults to better reflect how they actually get set - Remove ignored `gpg-password-file` option This stopped being used in https://github.com/rust-lang/rust/commit/7704d35accfe1b587ce41ea09ca3bf6a47aca117, but was never removed from config.toml. - Remove unused flags from `config.toml` + Disallow `infodir` and `localstatedir` in `config.toml` + Allow the flags in `./configure`, but give a warning that they will be ignored. + Fix incorrect comment that `datadir` will be ignored. Example output: ``` $ ./configure --set install.infodir=xxx configure: processing command line configure: configure: install.infodir := xxx configure: build.configure-args := ['--set', 'install.infodir=xxx'] warning: infodir will be ignored configure: configure: writing `config.toml` in current directory configure: configure: run `python /home/joshua/rustc3/x.py --help` configure: ``` - Update CHANGELOG - Add "as an example" where appropriate - Link to an issue instead of to ephemeral chats
2021-04-07Rollup merge of #83954 - estebank:issue-83613, r=varkorDylan DPC-81/+117
Do not ICE when closure is involved in Trait Alias Impl Trait Fix #83613.
2021-04-07Rollup merge of #83945 - SkiFire13:fix-83924, r=estebankDylan DPC-0/+65
Add suggestion to reborrow mutable references when they're moved in a for loop Address #83924
2021-04-07Rollup merge of #83936 - crlf0710:disallow_extern_block_non_ascii, r=ManishearthDylan DPC-2/+57
Disable using non-ascii identifiers in extern blocks. Fixes #83923.
2021-04-07Rollup merge of #83935 - SNCPlay42:param-default-impl-trait, r=varkorDylan DPC-59/+133
forbid `impl Trait` in generic param defaults Fixes #83929 Forbid using `impl Trait` in the default types of generic parameters, e.g. `struct Foo<T = impl Trait>`. I assume this was never supposed to be allowed - it seems no UI test used it. Note that using `impl Trait` in this position did not hit a feature gate error; however, this *shouldn't* be a breaking change as any attempt to use it should have hit the ICE in #83929 and/or failed to provide a defining use of the `impl Trait`.
2021-04-07Rollup merge of #83916 - Amanieu:asm_anonconst, r=petrochenkovDylan DPC-99/+154
Use AnonConst for asm! constants This replaces the old system which used explicit promotion. See #83169 for more background. The syntax for `const` operands is still the same as before: `const <expr>`. Fixes #83169 Because the implementation is heavily based on inline consts, we suffer from the same issues: - We lose the ability to use expressions derived from generics. See the deleted tests in `src/test/ui/asm/const.rs`. - We are hitting the same ICEs as inline consts, for example #78174. It is unlikely that we will be able to stabilize this before inline consts are stabilized.
2021-04-07Rollup merge of #83816 - JohnTitor:unused-doc-comments-on-macros, r=varkorDylan DPC-0/+48
Trigger `unused_doc_comments` on macros at once Fixes #83768
2021-04-07Rollup merge of #83634 - JohnTitor:proc-macro-ice, r=varkorDylan DPC-0/+68
Do not emit the advanced diagnostics on macros Fixes #83510
2021-04-07Auto merge of #83833 - jyn514:no-resolver, r=GuillaumeGomezbors-82/+82
rustdoc: Store intra-doc links in Cache instead of on items directly Items are first built after rustdoc creates the TyCtxt. To allow resolving the links before the TyCtxt is built, the links can't be stored on `clean::Item` directly. Helps with https://github.com/rust-lang/rust/issues/83761. Opening this early because I think it might decrease memory usage.
2021-04-07Auto merge of #83955 - ehuss:update-stage0, r=Mark-Simulacrumbors-2/+2
Bump bootstrap compiler Pulls in #83946 Closes #83914
2021-04-07Disable using non-ascii identifiers in extern blocks.Charles Lew-2/+57
2021-04-06Bump bootstrap compilerEric Huss-2/+2
2021-04-06Do not ICE when closure is involved in TAITEsteban Küber-0/+36
Fix #83613.
2021-04-06Remove trailing `:` from E0119 messageEsteban Küber-81/+81
2021-04-06Auto merge of #83828 - camelid:rustdoc-vec-perf, r=jyn514bors-3/+5
rustdoc: Use `ThinVec` in a few places Almost every crate has no primitives and no keywords defined in it, so using `ThinVec` should make some types smaller.
2021-04-06Add regression testGiacomo Stevanato-0/+65
2021-04-06Store links in Cache instead of on items directlyJoshua Nelson-82/+82
Items are first built after rustdoc creates the TyCtxt. To allow resolving the links before the TyCtxt is built, the links can't be stored on `clean::Item` directly.
2021-04-06Auto merge of #83934 - Dylan-DPC:rollup-nw5dadn, r=Dylan-DPCbors-92/+126
Rollup of 7 pull requests Successful merges: - #82963 (Move `SharedContext` to `context.rs`) - #83829 (rustc_target: Rely on defaults more in target specs) - #83895 (Add listing of lints (eg via `-W help`) to rustdoc) - #83902 (Update LLVM to support more wasm simd ops) - #83903 (Fix typo in TokenStream documentation) - #83910 (Update cargo) - #83920 (Fix HashMap/HashSet LLDB pretty-printer after hashbrown 0.11.0) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2021-04-06rustdoc: Use `ThinVec` in a few placesCamelid-3/+5
Almost every crate has no primitives and no keywords defined in it, so using `ThinVec` should make some types smaller.
2021-04-06Rollup merge of #83920 - ortem:fix-hashmap-lldb-pretty-printer-1.52, r=pnkfelixDylan DPC-6/+8
Fix HashMap/HashSet LLDB pretty-printer after hashbrown 0.11.0 The pretty-printer was broken in https://github.com/rust-lang/rust/pull/77566 after updating hashbrown to 0.11.0. Note that the corresponding GDB pretty-printer was updated properly. Fixes #83891
2021-04-06Rollup merge of #83910 - ehuss:update-cargo, r=ehussDylan DPC-0/+0
Update cargo 3 commits in 3c44c3c4b7900b8b13c85ead25ccaa8abb7d8989..65d57e6f384c2317f76626eac116f683e2b63665 2021-03-31 21:21:15 +0000 to 2021-04-04 15:07:52 +0000 - Fix typo in contrib docs. (rust-lang/cargo#9328) - fix clippy warnings (rust-lang/cargo#9323) - Add -Zallow-features to match rustc's -Z (rust-lang/cargo#9283)
2021-04-06Rollup merge of #83902 - alexcrichton:update-llvm, r=nikicDylan DPC-0/+0
Update LLVM to support more wasm simd ops Adds a commit with support for i64 simd comparisons for the wasm target
2021-04-06Rollup merge of #83895 - eggyal:issue-83883, r=jyn514Dylan DPC-3/+41
Add listing of lints (eg via `-W help`) to rustdoc Fixes #83883 r? `@jyn514`
2021-04-06Rollup merge of #82963 - camelid:move-sharedcontext, r=GuillaumeGomezDylan DPC-83/+77
Move `SharedContext` to `context.rs` It is tightly connected to `Context` and is primarily used as a field in `Context`. Thus, it should be next to `Context`.
2021-04-06Auto merge of #83875 - jyn514:diag_info, r=bugadanibors-129/+67
rustdoc: Use DiagnosticInfo in more parts of intra-doc links This makes the code a lot less verbose. This is separated into lots of tiny commits because it was easier for me that way, but the overall diff isn't that big if you want to read it at once. r? `@bugadani`
2021-04-06forbid `impl Trait` in generic param defaultsSNCPlay42-59/+133
2021-04-06Use AnonConst for asm! constantsAmanieu d'Antras-99/+154
2021-04-06update MiriRalf Jung-7/+11
2021-04-06Fix HashMap/HashSet LLDB pretty-printer after hashbrown 0.11.0ortem-6/+8
The pretty-printer was broken in https://github.com/rust-lang/rust/pull/77566 after updating hashbrown to 0.11.0. Note that the corresponding GDB pretty-printer was updated properly.
2021-04-06Add listing of lints (eg via -W help) to rustdocAlan Egerton-3/+41
2021-04-06Auto merge of #81234 - repnop:fn-alignment, r=lcnrbors-41/+40
Allow specifying alignment for functions Fixes #75072 This allows the user to specify alignment for functions, which can be useful for low level work where functions need to necessarily be aligned to a specific value. I believe the error cases not covered in the match are caught earlier based on my testing so I had them just return `None`.
2021-04-05Move `SharedContext` to `context.rs`Camelid-83/+77
It is tightly connected to `Context` and is primarily used as a field in `Context`. Thus, it should be next to `Context`.
2021-04-06Auto merge of #83592 - nagisa:nagisa/dso_local, r=davidtwcobors-114/+163
Set dso_local for hidden, private and local items This should probably have no real effect in most cases, as e.g. `hidden` visibility already implies `dso_local` (or at least LLVM IR does not preserve the `dso_local` setting if the item is already `hidden`), but it should fix `-Crelocation-model=static` and improve codegen in executables. Note that this PR does not exhaustively port the logic in [clang], only the portion that is necessary to fix a regression from LLVM 12 that relates to `-Crelocation_model=static`. Fixes #83335 [clang]: https://github.com/llvm/llvm-project/blob/3001d080c813da20b329303bf8f45451480e5905/clang/lib/CodeGen/CodeGenModule.cpp#L945-L1039
2021-04-05Update cargoEric Huss-0/+0
2021-04-05Auto merge of #83905 - JohnTitor:rollup-pa1la80, r=JohnTitorbors-199/+339
Rollup of 8 pull requests Successful merges: - #83370 (Add `x.py setup tools` which enables `download-rustc` by default) - #83489 (Properly suggest deref in else block) - #83734 (Catch a bad placeholder type error for statics in `extern`s) - #83814 (expand: Do not ICE when a legacy AST-based macro attribute produces and empty expression) - #83835 (rustdoc: sort search index items for compression) - #83849 (rustdoc: Cleanup handling of associated items for intra-doc links) - #83881 (:arrow_up: rust-analyzer) - #83885 (Document compiler/ with -Aprivate-intra-doc-links) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2021-04-05Allow specifying alignment for functionsWesley Norris-41/+40
2021-04-06Rollup merge of #83885 - jyn514:private-links, r=Mark-SimulacrumYuki Okushi-0/+2
Document compiler/ with -Aprivate-intra-doc-links Since compiler/ always passes --document-private-items, it's ok to link to items that are private.
2021-04-06Rollup merge of #83881 - lnicola:rust-analyzer-2021-04-05, r=jonas-schievinkYuki Okushi-20/+18
:arrow_up: rust-analyzer
2021-04-06Rollup merge of #83849 - jyn514:intra-doc-cleanup, r=bugadaniYuki Okushi-150/+148
rustdoc: Cleanup handling of associated items for intra-doc links Helps with https://github.com/rust-lang/rust/issues/83761 (right now the uses of the resolver are all intermingled with uses of the tyctxt). Best reviewed one commit at a time. r? ```@bugadani``` maybe? Feel free to reassign :)
2021-04-06Rollup merge of #83835 - notriddle:sort-index, r=ollie27Yuki Okushi-23/+26
rustdoc: sort search index items for compression This should not affect the appearance of the docs pages themselves. This makes the pre-compressed search index smaller, thanks to the empty-string path duplication format, and also the gzipped version, by giving the algorithm more structure to work with. rust$ wc -c search-index-old.js search-index-new.js 2628334 search-index-old.js 2586181 search-index-new.js 5214515 total rust$ gzip search-index-* rust$ wc -c search-index-old.js.gz search-index-new.js.gz 239486 search-index-old.js.gz 237386 search-index-new.js.gz 476872 total
2021-04-06Rollup merge of #83814 - petrochenkov:emptyexpr, r=davidtwcoYuki Okushi-0/+31
expand: Do not ICE when a legacy AST-based macro attribute produces and empty expression Fixes https://github.com/rust-lang/rust/issues/80251 The reported error is the same as for `let _ = #[cfg(FALSE)] EXPR;`
2021-04-06Rollup merge of #83734 - JohnTitor:issue-83621, r=davidtwcoYuki Okushi-0/+16
Catch a bad placeholder type error for statics in `extern`s Fixes #83621
2021-04-06Rollup merge of #83489 - LeSeulArtichaut:deref-else, r=davidtwcoYuki Okushi-1/+64
Properly suggest deref in else block Continues #79755, fixes #79736 r? `@davidtwco`
2021-04-06Rollup merge of #83370 - jyn514:setup-tools, r=Mark-SimulacrumYuki Okushi-5/+34
Add `x.py setup tools` which enables `download-rustc` by default Helps with https://github.com/rust-lang/rust/issues/81930. I know I said in that issue that I should fix that rebasing rebuilds bootstrap, but the compile time improvement is so good I think it's ok to leave that fix for later (I still plan to work on it). I think all the outright bugs have been fixed :) This builds on https://github.com/rust-lang/rust/pull/83368 so I can set the option to `if-unchanged`. r? ```@Mark-Simulacrum```
2021-04-05Auto merge of #83152 - guswynn:jemallocator_part2, r=Mark-Simulacrumbors-1/+63
Use tikv-jemallocator in rustc/rustdoc in addition to jemalloc-sys when enabled. In https://github.com/rust-lang/rust/pull/81782 it was mentioned that one reason rustc may benefit from minimalloc is it doesn't use the `sdallocx` api from jemalloc. Currently, on unix, rust uses jemalloc by importing its symbols to use them with the default, System (libc) global allocator. This PR switches its global alloc to `tikv-jemallocator`, which correctly uses sized deallocation (https://docs.rs/tikv-jemallocator/0.4.1/src/tikv_jemallocator/lib.rs.html#121-126). `tikv-jemallocator`, as far as I can tell, is a more up-to-date set of bindings to jemalloc than `jemallocator` The perf results of this pr are in large part due to the version upgrade of jemalloc, but sized deallocation has a non-trivial improvement, particularly to rustdoc. This pr also includes changes to bootstrap to correctly pass the jemalloc feature through to the rustdoc build
2021-04-05Update LLVM to support more wasm simd opsAlex Crichton-0/+0
Adds a commit with support for i64 simd comparisons for the wasm target
2021-04-05Auto merge of #83406 - b-naber:issue-83510, r=lcnrbors-0/+19
Prevent very long compilation runtimes in LateBoundRegionNameCollector Fixes https://github.com/rust-lang/rust/issues/83150 On recursive types such as in the example given in https://github.com/rust-lang/rust/issues/83150, the current implementation of `LateBoundRegionNameCollector` has very long compilation runtimes. To prevent those we store the types visited in the `middle::ty::Visitor` implementation of `LateBoundRegionNameCollector` in a `SsoHashSet`.
2021-04-05Use DiagnosticInfo for `report_diagnostic`Joshua Nelson-39/+29
2021-04-05Take DiagnosticInfo in privacy_errorJoshua Nelson-3/+7