about summary refs log tree commit diff
AgeCommit message (Collapse)AuthorLines
2022-10-05Rollup merge of #102699 - GuillaumeGomez:fix-hamburger-button-color, r=Dylan-DPCDylan DPC-3/+5
Fix hamburger button color Before: ![Screenshot from 2022-10-05 11-14-20](https://user-images.githubusercontent.com/3050060/194026621-e4df5750-92df-4194-a163-9787b45ace26.png) After: ![Screenshot from 2022-10-05 11-14-15](https://user-images.githubusercontent.com/3050060/194026618-6a365623-5181-4174-b6af-66962e5ba6a5.png) No need to backport it, beta doesn't seem affected. r? `@notriddle`
2022-10-05Rollup merge of #102496 - compiler-errors:into-suggestion, r=davidtwcoDylan DPC-66/+207
Suggest `.into()` when all other coercion suggestions fail Also removes some bogus suggestions because we now short-circuit when offering coercion suggestions(instead of, for example, suggesting every one that could possibly apply) Fixes #102415
2022-10-05Rollup merge of #102440 - sunfishcode:sunfishcode/wasm-no-export-tls-api, ↵Dylan DPC-6/+9
r=oli-obk Only export `__tls_*` on wasm32-unknown-unknown. From talking with `@abrown,` we aren't planning to have hosts call these `__tls_*` functions; instead, TLS initialization will be handled transparently within libc. Consequently, these functions don't need to be exported. Leave them exported on wasm32-unknown-unknown though, as wasm-bindgen does call them.
2022-10-05Rollup merge of #101061 - RalfJung:panic-on-uninit, r=oli-obkDylan DPC-240/+393
panic-on-uninit: adjust checks to 0x01-filling Now that `mem::uninitiailized` actually fills memory with `0x01` (https://github.com/rust-lang/rust/pull/99182), we can make it panic in a few less cases without risking a lot more UB -- which hopefully slightly improves compatibility with some old code, and which might increase the chance that we can check inside arrays in the future. We detect almost all of these with our lint, so authors of such code should still be warned -- but if this happens deep inside a dependency, the panic can be quite interruptive, so it might be better not to do it when there is no risk of LLVM UB. Therefore, adjust the `might_permit_raw_init` logic to care primarily about LLVM UB. To my knowledge, it actually covers all cases of LLVM UB now. Fixes https://github.com/rust-lang/rust/issues/66151 Cc ``@5225225``
2022-10-05Rollup merge of #100986 - ↵Dylan DPC-27/+52
TaKO8Ki:do-not-suggest-adding-generic-args-for-turbofish, r=compiler-errors Stop suggesting adding generic args for turbofish Fixes #100137
2022-10-05Add regression test for hamberger button color in mobile sidebarGuillaume Gomez-3/+4
2022-10-05Fix hamburger button color in mobile sidebarGuillaume Gomez-0/+1
2022-10-05Auto merge of #102691 - notriddle:rollup-tdtyagp, r=notriddlebors-42/+52
Rollup of 5 pull requests Successful merges: - #102574 (Make Hash{Set,Map}::with_hasher unstably const) - #102650 (Slightly improve no return for returning function error) - #102662 (rustdoc: remove no-op CSS `.code-header { display: block }`) - #102670 (follow-up fix about 101866 to print the self type.) - #102686 (Don't build the compiler before building rls) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2022-10-05stop suggesting adding generic args for turbofishTakayuki Maeda-27/+52
2022-10-05change might_permit_raw_init to fully detect LLVM UB, but not more than thatRalf Jung-240/+393
2022-10-04Rollup merge of #102686 - cuviper:rls-tool_std, r=jyn514Michael Howell-1/+1
Don't build the compiler before building rls The rls stub is a simple stable tool, which doesn't need compiler libs. (Similar to #97511)
2022-10-04Rollup merge of #102670 - lyming2007:issue-101866-fix, r=compiler-errorsMichael Howell-16/+16
follow-up fix about 101866 to print the self type. modified: compiler/rustc_trait_selection/src/traits/error_reporting/mod.rs modified: src/test/ui/error-codes/E0283.stderr modified: src/test/ui/error-codes/E0790.stderr modified: src/test/ui/traits/static-method-generic-inference.stderr modified: src/test/ui/type/issue-101866.stderr
2022-10-04Rollup merge of #102662 - notriddle:notriddle/code-header-display-block, ↵Michael Howell-4/+0
r=GuillaumeGomez rustdoc: remove no-op CSS `.code-header { display: block }` Since 76a3b609d0b93c5d8da5e4e3db37bd03e5cb1c30 converted code headers to real headers, `display: block` is now the default.
2022-10-04Rollup merge of #102650 - ↵Michael Howell-19/+18
Rageking8:slightly-improve-no-return-for-returning-function-error, r=compiler-errors Slightly improve no return for returning function error Fixes #100607 The rationale is that absolute beginners will be slightly confused as to why certain lines of code in a function does not require a semicolon. (I have actually witness a beginner having this confusion). Hence, a slight rationale is added "to return this value", which signals to the user that after removing said semicolon the value is returned resolving that error. However, if this is not desirable, I welcome any other suggestions. Thanks.
2022-10-04Rollup merge of #102574 - aDotInTheVoid:const_collections_with_hasher, ↵Michael Howell-2/+17
r=oli-obk,fee1-dead Make Hash{Set,Map}::with_hasher unstably const Makes [`HashMap::with_hasher`](https://doc.rust-lang.org/stable/std/collections/hash_map/struct.HashMap.html#method.with_hasher) and [`HashSet::with_hasher`](https://doc.rust-lang.org/stable/std/collections/hash_set/struct.HashSet.html#method.with_hasher) `const`. This allows ```rust static GlobalState: Mutex<HashMap<i32, i32, SomeHasher>> = Mutex::new(HashMap::with_hasher(SomeHasher::new())) ``` Tracking issue: #102575
2022-10-05Suggest `.into()` when all other coercion suggestions failMichael Goulet-66/+207
2022-10-04Don't build the compiler before building rlsJosh Stone-1/+1
The rls stub is a simple stable tool, which doesn't need compiler libs.
2022-10-05Auto merge of #102677 - weihanglo:update-cargo, r=ehussbors-9/+31
Update cargo 8 commits in f5fed93ba24607980647962c59863bbabb03ce14..0b84a35c2c7d70df4875a03eb19084b0e7a543ef 2022-09-27 12:03:57 +0000 to 2022-10-03 19:13:21 +0000 - Provide a better error message when mixing dep: with / (rust-lang/cargo#11172) - Remove lingering unstable flag `-Zfeatures` (rust-lang/cargo#11168) - Tweak wording (rust-lang/cargo#11164) - Expose libgit2-sys/vendored feature as vendored-libgit2 (rust-lang/cargo#11162) - refactor(cli): Upgrade to clap v4 (rust-lang/cargo#11159) - Expose guide to adding a new edition as rustdoc (rust-lang/cargo#11157) - Remove `multitarget` from -Zhelp (rust-lang/cargo#11158) - Remove outdated comments (rust-lang/cargo#11155)
2022-10-04Auto merge of #101768 - sunfishcode:sunfishcode/wasi-stdio-lock-asfd, ↵bors-0/+27
r=joshtriplett Add `AsFd` implementations for stdio lock types on WASI. This mirrors the implementations on Unix platforms, and also mirrors the existing `AsRawFd` impls. This is similar to #100892, but is for the `*Lock` types.
2022-10-04Update cargoWeihang Lo-9/+31
8 commits in f5fed93ba24607980647962c59863bbabb03ce14..0b84a35c2c7d70df4875a03eb19084b0e7a543ef 2022-09-27 12:03:57 +0000 to 2022-10-03 19:13:21 +0000 - Provide a better error message when mixing dep: with / (rust-lang/cargo#11172) - Remove lingering unstable flag `-Zfeatures` (rust-lang/cargo#11168) - Tweak wording (rust-lang/cargo#11164) - Expose libgit2-sys/vendored feature as vendored-libgit2 (rust-lang/cargo#11162) - refactor(cli): Upgrade to clap v4 (rust-lang/cargo#11159) - Expose guide to adding a new edition as rustdoc (rust-lang/cargo#11157) - Remove `multitarget` from -Zhelp (rust-lang/cargo#11158) - Remove outdated comments (rust-lang/cargo#11155)
2022-10-04follow-up fix about 101866 to print the self type.Yiming Lei-16/+16
modified: compiler/rustc_trait_selection/src/traits/error_reporting/mod.rs modified: src/test/ui/error-codes/E0283.stderr modified: src/test/ui/error-codes/E0790.stderr modified: src/test/ui/traits/static-method-generic-inference.stderr modified: src/test/ui/type/issue-101866.stderr
2022-10-04Auto merge of #102666 - matthiaskrgr:rollup-tuge18t, r=matthiaskrgrbors-201/+434
Rollup of 6 pull requests Successful merges: - #102241 (Package `rust-docs-json` into nightly components (take 3)) - #102488 (Check generic argument compatibility when projecting assoc ty) - #102647 (Only allow ~const bounds for traits with #[const_trait]) - #102648 (Add test for #102605) - #102651 (It's not about types or consts, but the lack of regions) - #102653 (resolve instance: missing value to `delay_span_bug`) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2022-10-04Rollup merge of #102653 - lcnr:delay_span_bug, r=fee1-deadMatthias Krüger-2/+6
resolve instance: missing value to `delay_span_bug`
2022-10-04Rollup merge of #102651 - oli-obk:non_region_things, r=lcnrMatthias Krüger-77/+71
It's not about types or consts, but the lack of regions pulled out of https://github.com/rust-lang/rust/pull/101900 which adds a fourth kind of non-lifetime generic parameter, and the naming of these methods would get ridiculous.
2022-10-04Rollup merge of #102648 - Rageking8:add-test-for-#102605, r=compiler-errorsMatthias Krüger-0/+56
Add test for #102605 Fixes #102605
2022-10-04Rollup merge of #102647 - oli-obk:tilde_const_bounds, r=fee1-deadMatthias Krüger-118/+216
Only allow ~const bounds for traits with #[const_trait] r? `@fee1-dead`
2022-10-04Rollup merge of #102488 - compiler-errors:gat-compatibility, r=oli-obkMatthias Krüger-2/+68
Check generic argument compatibility when projecting assoc ty Fixes #102114
2022-10-04Rollup merge of #102241 - jyn514:manifest-json-docs, r=Mark-SimulacrumMatthias Krüger-2/+17
Package `rust-docs-json` into nightly components (take 3) `dist` creates a `rust-docs-json.tar.xz` tarfile. But build-manifest expected it to be named `rust-docs-json-preview.tar.xz`. Change build-manifest to allow the name without the `-preview` suffix. I haven't actually tested this :( build-manifest is a pain to run locally.
2022-10-04rustdoc: remove no-op CSS `.code-header { display: block }`Michael Howell-4/+0
Since 76a3b609d0b93c5d8da5e4e3db37bd03e5cb1c30 converted code headers to real headers, `display: block` is now the default.
2022-10-04missing value to delay_span_buglcnr-2/+6
2022-10-04It's not about types or consts, but the lack of regionsOli Scherer-77/+71
2022-10-04Auto merge of #102652 - Dylan-DPC:rollup-6ff8ct8, r=Dylan-DPCbors-58/+467
Rollup of 6 pull requests Successful merges: - #101189 (Implement `Ready::into_inner()`) - #101642 (Fix in-place collection leak when remaining element destructor panic) - #102489 (Normalize substs before resolving instance in `NoopMethodCall` lint) - #102559 (Don't ICE when trying to copy unsized value in const prop) - #102568 (Lint against nested opaque types that don't satisfy associated type bounds) - #102633 (Fix rustdoc ICE in invalid_rust_codeblocks lint) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2022-10-04slightly improve no return for returning function errorRageking8-19/+18
2022-10-04Rollup merge of #102633 - Nilstrieb:rustdoc-lint-🏳️‍⚧️late, ↵Dylan DPC-3/+27
r=davidtwco Fix rustdoc ICE in invalid_rust_codeblocks lint The diagnostic message extraction code didn't handle translations yet. Fixes #102603 Fixes #102631 r? `@davidtwco`
2022-10-04Rollup merge of #102568 - compiler-errors:lint-unsatisfied-opaques, r=oli-obkDylan DPC-1/+274
Lint against nested opaque types that don't satisfy associated type bounds See the test failures for examples of places where this lint would fire. r? `@oli-obk`
2022-10-04Rollup merge of #102559 - compiler-errors:issue-102553, r=oli-obkDylan DPC-5/+35
Don't ICE when trying to copy unsized value in const prop When we have a trivially false where-clause predicate like `Self: Sized` where `Self = dyn Trait`, we sometimes don't throw an error during typeck for an illegal operation such as copying an unsized type. This, unfortunately, cannot be made into an error (at least not without some migration -- see #95611 for example), but we should at least not ICE, since this function will never actually be reachable from main, for example. r? `@RalfJung` since I think you added these assertions? but feel free to reassign. Fixes #102553
2022-10-04Rollup merge of #102489 - compiler-errors:issue-102074, r=oli-obkDylan DPC-13/+40
Normalize substs before resolving instance in `NoopMethodCall` lint Fixes #102074 r? types
2022-10-04Rollup merge of #101642 - SkiFire13:fix-inplace-collection-leak, r=the8472Dylan DPC-36/+67
Fix in-place collection leak when remaining element destructor panic Fixes #101628 cc `@the8472` I went for the drop guard route, placing it immediately before the `forget_allocation_drop_remaining` call and after the comment, as to signal they are closely related. I also updated the test to check for the leak, though the only change really needed was removing the leak clean up for miri since now that's no longer leaked.
2022-10-04Rollup merge of #101189 - daxpedda:ready-into-inner, r=joshtriplettDylan DPC-0/+24
Implement `Ready::into_inner()` Tracking issue: #101196. This implements a method to unwrap the value inside a `Ready` outside an async context. See https://docs.rs/futures/0.3.24/futures/future/struct.Ready.html#method.into_inner for previous work. This was discussed in [Zulip beforehand](https://rust-lang.zulipchat.com/#narrow/stream/219381-t-libs/topic/.60Ready.3A.3Ainto_inner.28.29.60): > An example I'm hitting right now: I have a cross-platform library that provides a functions that returns a `Future`. The only reason why it returns a `Future` is because the WASM platform requires it, but the native doesn't, to make a cross-platform API that is equal for all I just return a `Ready` on the native targets. > > Now I would like to expose native-only functions that aren't async, that users can use to avoid having to deal with async when they are targeting native. With `into_inner` that's easily solvable now. > > I want to point out that some internal restructuring could be used to solve that problem too, but in this case it's not that simple, the library uses internal traits that return the `Future` already and playing around with that would introduce unnecessary `cfg` in a lot more places. So it is really only a quality-of-life feature.
2022-10-04Auto merge of #102622 - camsteffen:move-layout, r=fee1-deadbors-2343/+2337
Move layout_of and friends from rustc_middle to rustc_ty_utils Breaks up the very large module that is `rustc_middle::ty::layout` by fork-lifting some queries into `rustc_ty_utils::{abi, layout}`. This does set back `rustc_ty_utils` to having untranslatable diagnostics. I'd like to leave this as a separate task.
2022-10-04Merge the `~const` and `impl const` checks and add some explanatory notesOli Scherer-45/+34
2022-10-04add test for #102605Rageking8-0/+56
2022-10-04Only allow ~const bounds for traits with #[const_trait]Oli Scherer-83/+192
2022-10-04Auto merge of #102644 - matthiaskrgr:rollup-rg0sw41, r=matthiaskrgrbors-220/+893
Rollup of 7 pull requests Successful merges: - #102441 (Suggest unwrap_or_else when a closure is given) - #102547 (Migrate CSS theme for search results) - #102567 (Delay evaluating lint primary message until after it would be suppressed) - #102624 (rustdoc: remove font family CSS on `.rustdoc-toggle summary::before`) - #102628 (Change the parameter name of From::from to `value`) - #102637 (Ignore fuchsia on two compiler tests) - #102639 (Improve spans when splitting multi-char operator tokens for proc macros.) Failed merges: - #102496 (Suggest `.into()` when all other coercion suggestions fail) r? `@ghost` `@rustbot` modify labels: rollup
2022-10-04Rollup merge of #102639 - nnethercote:improve-spans-splitting, r=Aaron1011Matthias Krüger-84/+166
Improve spans when splitting multi-char operator tokens for proc macros. When a two-char (or three-char) operator token is split into single-char operator tokens before being passed to a proc macro, the single-char tokens are given the original span of length two (or three). This PR gives them more accurate spans. r? `@Aaron1011` cc `@petrochenkov`
2022-10-04Rollup merge of #102637 - andrewpollack:ignore-fuchsia-two-tests, r=tmandryMatthias Krüger-0/+2
Ignore fuchsia on two compiler tests Adding `ignore-fuchsia` to two irrelevant compiler tests cc. `@djkoloski` r? `@tmandry`
2022-10-04Rollup merge of #102628 - H4x5:master, r=scottmcmMatthias Krüger-1/+1
Change the parameter name of From::from to `value` The `From` trait is currently defined as: ```rust pub trait From<T>: Sized { fn from(_: T) -> Self; } ``` The name of the argument is `_`. I am proposing to change it to `value`, ie. ```rust pub trait From<T>: Sized { fn from(value: T) -> Self; } ``` This would be more consistent with the `TryFrom`, which looks like this: ```rust pub trait TryFrom<T>: Sized { type Error; fn try_from(value: T) -> Result<Self, Self::Error>; } ``` The reason for this proposal is twofold: 1. Consistency with the rest of the standard library. The `TryFrom` trait uses `value`, and no `From` implementation uses the default name (as it is quite useless). 2. When generating trait implementations with rust-analyzer/IntelliJ, the parameter name is copied, and it always has to be changed. Optionally, another name like `x` could be used. I only propose `value` for consistency with `TryFrom`. Changing parameter names is not a breaking change. Note: this was originally posted as an internals thread [here](https://internals.rust-lang.org/t/change-the-argument-name-of-from-from/17480)
2022-10-04Rollup merge of #102624 - notriddle:notriddle/summary-before, r=GuillaumeGomezMatthias Krüger-4/+0
rustdoc: remove font family CSS on `.rustdoc-toggle summary::before` This rule became irrelevant since c58246efe47bea09d4f3e70f536e4c9bb7770749 made it so that the `summary::before` pseudo-element contains an SVG instead of text.
2022-10-04Rollup merge of #102567 - compiler-errors:issue-102561, r=davidtwcoMatthias Krüger-1/+23
Delay evaluating lint primary message until after it would be suppressed Fixes #102561 Fixes #102572
2022-10-04Rollup merge of #102547 - GuillaumeGomez:migrate-css-theme-search-result, ↵Matthias Krüger-128/+605
r=notriddle,jsha Migrate CSS theme for search results Part of https://github.com/rust-lang/rust/pull/98460. Just like https://github.com/rust-lang/rust/pull/102237, I unified theme to how the `ayu` handles this one: only one color for the background when search results are focused or hovered. You can test it [here](https://rustdoc.crud.net/imperio/migrate-css-theme-search-result/lib2/index.html?search=coo). cc `@jsha` r? `@notriddle` PS: The repetition in GUI tests is getting out of hand so I opened https://github.com/GuillaumeGomez/browser-UI-test/issues/363 to think about adding possibility to declare functions so we can greatly improve this.