about summary refs log tree commit diff
path: root/src
AgeCommit message (Collapse)AuthorLines
2020-08-10Split fix into another section for E0749Ivan Tham-1/+11
2020-08-10Add sample fix for E0749Ivan Tham-0/+1
Even though the description is clear but the solution may not be as straightforward. Adding a suggested fix.
2020-08-10Auto merge of #75204 - cuviper:freebsd11, r=Mark-Simulacrumbors-25/+11
Upgrade the FreeBSD toolchain to version 11.4 FreeBSD 10 reached its end-of-life in October 2018, and that toolchain caused issues in the LLVM 11 upgrade (#73526) that are resolved with the toolchain from FreeBSD 11. Closes #72390.
2020-08-10Auto merge of #74410 - mati865:mingw-no-self-contained-when-cross-compiling, ↵bors-1/+3
r=petrochenkov MinGW: disable self-contained mode when cross compiling When cross compiling users have to provide own linker and libraries anyway. Using rust provided MinGW crt objects is harmful here and has no benefits. cc https://github.com/rust-lang/rust/issues/68887
2020-08-10Auto merge of #75351 - JohnTitor:rollup-q9udsyx, r=JohnTitorbors-38/+104
Rollup of 8 pull requests Successful merges: - #74200 (Std panicking unsafe block in unsafe fn) - #75286 (Add additional case for Path starts with) - #75318 (Resolve `char` as a primitive even if there is a module in scope) - #75320 (Detect likely `for foo of bar` JS syntax) - #75328 (Cleanup E0749) - #75344 (Rename "Important traits" to "Notable traits") - #75348 (Move to intra-doc links in library/core/src/time.rs) - #75350 (Do not ICE when lowering invalid extern fn with bodies) Failed merges: r? @ghost
2020-08-10Rollup merge of #75350 - estebank:foreign-fn-with-body-ice, r=davidtwcoYuki Okushi-1/+27
Do not ICE when lowering invalid extern fn with bodies Fix #75283.
2020-08-10Rollup merge of #75344 - camelid:rename-important-to-notable-traits, ↵Yuki Okushi-21/+21
r=Manishearth Rename "Important traits" to "Notable traits" Fixes #75245. --- * Rename it in the UI * Rename the CSS classes
2020-08-10Rollup merge of #75328 - GuillaumeGomez:cleanup-e0749, r=Dylan-DPCYuki Okushi-5/+20
Cleanup E0749 r? @pickfire
2020-08-10Rollup merge of #75320 - estebank:js-for-i-of-x, r=davidtwcoYuki Okushi-7/+25
Detect likely `for foo of bar` JS syntax Fix #75311.
2020-08-10Rollup merge of #75318 - jyn514:primitive, r=manishearthYuki Okushi-4/+11
Resolve `char` as a primitive even if there is a module in scope Closes https://github.com/rust-lang/rust/issues/58699. r? @Manishearth
2020-08-09Do not ICE when lowering invalid extern fn with bodiesEsteban Küber-1/+27
Fix #75283.
2020-08-09Auto merge of #75345 - Aaron1011:fix/no-std-hygiene, r=petrochenkovbors-163/+233
Remove normalization of `Span` debug output in proc-macro tests Fixes #74800 The definition of `is_x86_feature_detected!` (and similar macros) depends on the platform - it is produced by a `cfg_if!` invocation on x86, and a plain `#[cfg]` on other platforms. Since it is part of the prelude, we will end up importing different hygiene information depending on the platform. This previously required us to avoid printing raw `SyntaxContext` ids in any tests that uses the standard library, since the captured output will be platform-dependent. Previously, we replaced all `SyntaxContext` ids with "#CTXT", and the raw `Span` lo/hi bytes with "LO..HI". This commit adds `#![no_std]` and `extern crate std` to all proc-macro tests that print spans. This suppresses the prelude import, while still using lang items from `std` (which gives us a buildable binary). With this apporach, we will only load hygiene information for things which we explicitly import. This lets us re-add `-Z unpretty=expanded,hygiene`, since its output can now be made stable across all platforms. Additionally, we use `-Z span-debug` in more places, which lets us avoid the "LO..HI" normalization hack.
2020-08-09Auto merge of #75278 - cuviper:indexmap, r=Mark-Simulacrumbors-191/+138
Upgrade indexmap and use it more First this upgrades `indexmap` to 1.5.1, which is now based on `hashbrown::raw::RawTable`. This means it shares a lot of the same performance characteristics for insert, lookup, etc., while keeping items in insertion order. Then across various rustc crates, this replaces a lot of `Vec`+`HashMap` pairs with a single `IndexMap` or `IndexSet`. Closes #60608. r? @eddyb
2020-08-09rustc_span: note the perf loss seen from IndexSet in symbol::InternerJosh Stone-0/+4
2020-08-09rustc_typeck: use IndexSet in InteriorVisitorJosh Stone-19/+14
2020-08-09rustc_typeck: use IndexSet in UniquePredicatesJosh Stone-9/+5
2020-08-09rustc_span: use IndexSet in SpanInternerJosh Stone-12/+5
2020-08-09rustc_mir_build: use IndexMap in TestKind::SwitchIntJosh Stone-23/+17
2020-08-09rustc_mir: use IndexSet in PlaceholderIndicesJosh Stone-8/+7
2020-08-09rustc_mir: use IndexMap in BorrowSetJosh Stone-43/+52
2020-08-09rustc_middle: use IndexSet in OnDiskCacheJosh Stone-17/+5
2020-08-09rustc_metadata: use IndexSet in EncodeContextJosh Stone-17/+5
2020-08-09rustc_data_structures: use IndexSet in TransitiveRelationJosh Stone-26/+13
2020-08-09rustc_codegen_llvm: use IndexSet in CoverageMapGeneratorJosh Stone-16/+10
2020-08-09Upgrade indexmap to 1.5.1, now using hashbrown!Josh Stone-1/+1
2020-08-09Rename "Important traits" to "Notable traits"Camelid-21/+21
* Rename it in the UI * Rename the CSS classes
2020-08-09Remove normalization of `Span` debug output in proc-macro testsAaron Hill-163/+233
Fixes #74800 The definition of `is_x86_feature_detected!` (and similar macros) depends on the platform - it is produced by a `cfg_if!` invocation on x86, and a plain `#[cfg]` on other platforms. Since it is part of the prelude, we will end up importing different hygiene information depending on the platform. This previously required us to avoid printing raw `SyntaxContext` ids in any tests that uses the standard library, since the captured output will be platform-dependent. Previously, we replaced all `SyntaxContext` ids with "#CTXT", and the raw `Span` lo/hi bytes with "LO..HI". This commit adds `#![no_std]` and `extern crate std` to all proc-macro tests that print spans. This suppresses the prelude import, while still using lang items from `std` (which gives us a buildable binary). With this apporach, we will only load hygiene information for things which we explicitly import. This lets us re-add `-Z unpretty=expanded,hygiene`, since its output can now be made stable across all platforms. Additionally, we use `-Z span-debug` in more places, which lets us avoid the "LO..HI" normalization hack.
2020-08-09Auto merge of #75137 - Aaron1011:fix/hygiene-skip-expndata, r=petrochenkovbors-4/+25
Don't serialize ExpnData for foreign crates When we encode an ExpnId into the crate metadata, we write out the CrateNum of the crate that 'owns' the corresponding `ExpnData`, which is later used to decode the `ExpnData` from its owning crate. However, we current serialize the `ExpnData` for all `ExpnIds` that we serialize, even if the `ExpnData` was already serialized into a foreign crate. This commit skips encoding this kind of `ExpnData`, which should hopefully speed up metadata encoding and reduce the total metadata size.
2020-08-09Upgrade the FreeBSD toolchain to version 11.4Josh Stone-25/+11
FreeBSD 10 reached its end-of-life in October 2018, and that toolchain caused issues in the LLVM 11 upgrade (#73526) that are resolved with the toolchain from FreeBSD 11.
2020-08-09Auto merge of #75134 - Aaron1011:feature/expn-data-parent-hash, r=petrochenkovbors-33/+39
Hash parent ExpnData cc https://github.com/rust-lang/rust/pull/72121#discussion_r460528326
2020-08-09Add comment about the lack of `ExpnData` serialization for proc-macro cratesAaron Hill-0/+7
2020-08-09Give precedence to primitives over modulesJoshua Nelson-4/+11
This has less surprising behavior when there is a module with the same name as a primitive in scope.
2020-08-09Remove E0749 from untested error codesGuillaume Gomez-1/+1
2020-08-09Clean up E0749 explanationGuillaume Gomez-4/+19
2020-08-09tests: Mark `ui/asm/bad-arch.rs` as requiring wasm llvm backendVadim Petrochenkov-1/+2
2020-08-08Detect likely `for foo of bar` JS syntaxEsteban Küber-7/+25
Fix #75311.
2020-08-09Rollup merge of #75292 - slanterns:cleanup-E0502, r=GuillaumeGomezYuki Okushi-2/+2
Clean up E0502 `ref` on an entire `let` pattern is discouraged, take a reference with `&` instead.
2020-08-09Rollup merge of #75291 - GuillaumeGomez:cleanup-e0750, r=pickfireYuki Okushi-6/+19
Clean up E0750 r? @Dylan-DPC
2020-08-09Rollup merge of #75290 - rust-lang:min_const_generics-version, r=jonas-schievinkYuki Okushi-1/+1
fix `min_const_generics` version https://github.com/rust-lang/rust/pull/74877#discussion_r467451813 > This should be 1.47.0
2020-08-09Rollup merge of #74712 - strom-und-spiele:E0271-cleanup, r=Mark-SimulacrumYuki Okushi-30/+13
Update E0271 explanation When reading the explanation, I got confused by it. I hope the wording is clearer now.
2020-08-08Remove E0750 from unchecked error codesGuillaume Gomez-2/+1
2020-08-08Clean up E0750 explanationGuillaume Gomez-4/+18
2020-08-08Auto merge of #75260 - davidtwco:polymorphization-promoted-substs, r=lcnrbors-15/+104
polymorphize: unevaluated constants This PR makes polymorphization visit the promoted MIR of unevaluated constants with available promoted MIR instead of visiting the substitutions of that constant - which will mark all of the generic parameters as used; in addition polymorphization will now visit non-promoted unevaluated constants rather than visit their substs. r? @lcnr
2020-08-08Auto merge of #74533 - nikic:issue-74425, r=eddybbors-8/+32
Emit == null instead of <= null for niche check When the niche maximum is zero, emit a "== zero" check instead of a "<= zero" check. In particular, this avoids the awkward case of "<= null". While LLVM does canonicalize this to "== null", this apparently doesn't happen for constant expressions, leading to the issue in #74425. While that can be addressed on the LLVM side, it still seems prudent to emit sensible IR here, because this will allow null checks to be optimized earlier in the pipeline. Fixes #74425.
2020-08-08Use `&` instead of `let ref` in E0502 Slanterns-2/+2
`ref` on an entire `let` pattern is discouraged, take a reference with `&` instead.
2020-08-08fix `min_const_generics` versionBastian Kauschke-1/+1
2020-08-08Update E0271.mdstrom-und-spiele-30/+13
remove references to non existing code, expand solution suggestions remove unneeded code in solution
2020-08-08Emit == null instead of <= nullNikita Popov-8/+32
When the niche maximum is zero, emit a "== zero" check instead of a "<= zero" check. In particular, this avoid the awkward case of "<= null". While LLVM does canonicalize this to "!= null", this appently doesn't happen for constant expressions, leading to the issue in #74425. While that can be addressed on the LLVM side, it still seems prudent to emit sensible IR here, because this will allow null checks to be optimized earlier in the pipeline. Fixes #74425.
2020-08-08Auto merge of #74932 - nnethercote:rm-ast-session-globals, r=petrochenkovbors-841/+865
Remove `librustc_ast` session globals By moving the data onto `Session`. r? @petrochenkov
2020-08-08Auto merge of #75276 - JohnTitor:rollup-rz4hs0w, r=JohnTitorbors-93/+152
Rollup of 7 pull requests Successful merges: - #75224 (Don't call a function in function-arguments-naked.rs) - #75237 (Display elided lifetime for non-reference type in doc) - #75250 (make MaybeUninit::as_(mut_)ptr const) - #75253 (clean up const-hacks in int endianess conversion functions) - #75259 (Add missing backtick) - #75267 (Small cleanup) - #75270 (fix a couple of clippy findings) Failed merges: r? @ghost