about summary refs log tree commit diff
path: root/src
AgeCommit message (Collapse)AuthorLines
2021-04-08Auto merge of #83981 - nagisa:nagisa/revert-cfg-wasm, r=Mark-Simulacrumbors-1/+0
Remove the insta-stable `cfg(wasm)` The addition of `cfg(wasm)` was an oversight on my end that turns out to have a number of downsides: * It was introduced as an insta-stable addition, forgoing the usual staging mechanism we use for potentially far-reaching changes; * It is a breaking change for people who are using `--cfg wasm` either directly or via cargo for other purposes; * It is not entirely clear if a bare `wasm` cfg is a right option or whether `wasm` family of targets are special enough to warrant special-casing these targets specifically. As for the last point, there appears to be a fair amount of support for reducing the boilerplate in specifying architectures from the same family, while ignoring their pointer width. The suggested way forward would be to propose such a change as a separate RFC as it is potentially a quite contentious addition. cc #83879 `@devsnek`
2021-04-08Auto merge of #83866 - jyn514:disambiguator-error, r=camelidbors-14/+46
rustdoc: Link to the docs on namespaces when an unknown disambiguator is found cc https://github.com/rust-lang/rust/issues/83859 `@lopopolo` does this look about like what you expected? r? `@camelid`
2021-04-07Fix some typos in docs for `-C split-debuginfo`Camelid-5/+5
2021-04-08Auto merge of #83986 - Dylan-DPC:rollup-51vygcj, r=Dylan-DPCbors-147/+740
Rollup of 5 pull requests Successful merges: - #82497 (Fix handling of `--output-format json` flag) - #83689 (Add more info for common trait resolution and async/await errors) - #83952 (Account for `ExprKind::Block` when suggesting .into() and deref) - #83965 (Add Debug implementation for hir::intravisit::FnKind) - #83974 (Fix outdated crate names in `rustc_interface::callbacks`) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2021-04-08Rollup merge of #83952 - estebank:issue-83943, r=petrochenkovDylan DPC-4/+40
Account for `ExprKind::Block` when suggesting .into() and deref Fix #83943.
2021-04-08Rollup merge of #83689 - estebank:cool-bears-hot-tip, r=davidtwcoDylan DPC-128/+672
Add more info for common trait resolution and async/await errors * Suggest `Pin::new`/`Box::new`/`Arc::new`/`Box::pin` in more cases * Point at `impl` and type defs introducing requirements on E0277
2021-04-08Rollup merge of #82497 - jyn514:json, r=CraftSpiderDylan DPC-15/+28
Fix handling of `--output-format json` flag - Don't treat it as deprecated on stable and beta channels. Before, it would give confusing and incorrect output: ``` warning: the 'output-format' flag is considered deprecated | = warning: see issue #44136 <https://github.com/rust-lang/rust/issues/44136> for more information error: json output format isn't supported for doc generation ``` Both of those are wrong: output-format isn't deprecated, and json output is supported. - Require -Z unstable-options for `--output-format json` Previously, it was allowed by default on nightly, which made it hard to realize the flag wouldn't be accepted on beta or stable. To get the test working I had to remove `-Z unstable-options`, which x.py passed to compiletest unconditionally. It was first added in https://github.com/rust-lang/rust/commit/8c2ec689c159e7f021d5913efb991aff875be967 so `-Z miri` would be allowed. -Z miri is no longer passed unconditionally, so hopefully removing it won't break anything. r? ```@aDotInTheVoid``` cc ```@HeroicKatora``` ```@CraftSpider``` Thanks to ```@memoryruins``` for pointing it out on Discord! cc ```@Mark-Simulacrum``` for the change to compiletest.
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-07Remove the insta-stable `cfg(wasm)`Simonas Kazlauskas-1/+0
The addition of `cfg(wasm)` was an oversight on my end that has a number of downsides: * It was introduced as an insta-stable addition, forgoing the usual staging mechanism we use for potentially far-reaching changes; * It is a breaking change for people who are using `--cfg wasm` either directly or via cargo for other purposes; * It is not entirely clear if a bare `wasm` cfg is a right option or whether `wasm` family of targets are special enough to warrant special-casing these targets specifically. As for the last point, there appears to be a fair amount of support for reducing the boilerplate in specifying architectures from the same family, while ignoring their pointer width. The suggested way forward would be to propose such a change as a separate RFC as it is potentially a quite contentious addition.
2021-04-08Stablize `non_ascii_idents` feature.Charles Lew-498/+149
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-07add testAliénore Bouttefeux-0/+133
2021-04-07Added additional comments and minor editsK-2/+2
2021-04-07rebase and update testsEsteban Küber-10/+42
2021-04-07Reuse logic for determining the channel in the rest of rustdocJoshua Nelson-22/+29
This doesn't update main.js because it's included as a fixed string.
2021-04-07rustdoc: Link to the docs on namespaces when an unknown disambiguator is foundJoshua Nelson-1/+26
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-06Add spans to E0277 for impl/trait type/fn obligation disparityEsteban Küber-14/+44
2021-04-06Always mention `Box::pin` when dealing with `!Unpin`Esteban Küber-0/+3
2021-04-06Point at `impl` and type defs introducing requirements on E0277Esteban Küber-106/+585
2021-04-07Auto merge of #83955 - ehuss:update-stage0, r=Mark-Simulacrumbors-2/+2
Bump bootstrap compiler Pulls in #83946 Closes #83914
2021-04-06Use a more appropriate span for `;` suggestionEsteban Küber-0/+36
Fix #83892.
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-06Account for `ExprKind::Block` when suggesting .into() and derefEsteban Küber-4/+40
Fix #83943.
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-06Fix handling of `--output-format json` flagJoshua Nelson-15/+28
- Don't treat it as deprecated on stable and beta channels. Before, it would give confusing and incorrect output: ``` warning: the 'output-format' flag is considered deprecated | = warning: see issue #44136 <https://github.com/rust-lang/rust/issues/44136> for more information error: json output format isn't supported for doc generation ``` Both of those are wrong: output-format isn't deprecated, and json output is supported. - Require -Z unstable-options for `--output-format json` Previously, it was allowed by default on nightly, which made it hard to realize the flag wouldn't be accepted on beta or stable. Note that this still allows `--output-format html`, which has been stable since 1.0. - Remove unnecessary double-checking of the feature gate when parsing the output format - Add custom run-make test since compiletest passes -Zunstable-options by default
2021-04-06Fix a couple resolve bugs from binder refactorJack Huey-0/+41
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-06Fix all occurences of `needless_borrow` internallyJason Newcomb-6/+6
2021-04-06Use AnonConst for asm! constantsAmanieu d'Antras-99/+154