about summary refs log tree commit diff
path: root/src
AgeCommit message (Collapse)AuthorLines
2022-11-15Auto merge of #104428 - matthiaskrgr:rollup-jo3078i, r=matthiaskrgrbors-14/+1217
Rollup of 13 pull requests Successful merges: - #103842 (Adding Fuchsia compiler testing script, docs) - #104354 (Remove leading newlines from `NonZero*` doc examples) - #104372 (Update compiler-builtins) - #104380 (rustdoc: remove unused CSS `code { opacity: 1 }`) - #104381 (Remove dead NoneError diagnostic handling) - #104383 (Remove unused symbols and diagnostic items) - #104391 (Deriving cleanups) - #104403 (Specify language of code comment to generate document) - #104404 (Fix missing minification for static files) - #104413 ([llvm-wrapper] adapt for LLVM API change) - #104415 (rustdoc: fix corner case in search keyboard commands) - #104422 (Fix suggest associated call syntax) - #104426 (Add test for #102154) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2022-11-15Rollup merge of #104426 - aDotInTheVoid:test-102154, r=compiler-errorsMatthias Krüger-0/+13
Add test for #102154 Closes #102154
2022-11-15Rollup merge of #104422 - ↵Matthias Krüger-0/+68
compiler-errors:fix-suggest_associated_call_syntax, r=BoxyUwU Fix suggest associated call syntax Fixes #104412
2022-11-15Rollup merge of #104415 - notriddle:notriddle/search-keyboard-commands, ↵Matthias Krüger-0/+29
r=GuillaumeGomez rustdoc: fix corner case in search keyboard commands This fixes a bug when that shows up in nightly and in stable where: * Search something * Press down: first result is highlighted * Press down: second result is highlighted * Press down: third result is highlighted * Press right: first result of second tab is highlighted * Press left: third result of first tab is highlighted * Press up: second result is highlighted * Press up: first result is highlighted * Press up: Search box is highlighted * Press down: **third result** is highlighted, where it ought to highlight the first result
2022-11-15Rollup merge of #104404 - GuillaumeGomez:fix-missing-minification, r=notriddleMatthias Krüger-2/+6
Fix missing minification for static files It's a fix for https://github.com/rust-lang/rust/pull/101702. The problem was that `Path::ends_with` doesn't do what we thought it does: it checks if the entire item is the last path part, no just if the "path string" ends with the given argument. So instead, I just used the `extension()` method to get the information we want. cc `@jsha` r? `@notriddle` PS: Is it worth it to add a CI test to ensure that the minification was performed on JS and CSS files or not?
2022-11-15Rollup merge of #104383 - WaffleLapkin:rustc_undiagnostic_item, ↵Matthias Krüger-6/+6
r=compiler-errors Remove unused symbols and diagnostic items As the title suggests, this removes unused symbols from `sym::` and `#[rustc_diagnostic_item]` annotations that weren't mentioned anywhere. Originally I tried to use grep, to find symbols and item names that are never mentioned via `sym::name`, however this produced a lot of false positives (?), for example clippy matching on `Symbol::as_str` or macros "implicitly" adding `sym::`. I ended up fixing all these false positives (?) by hand, but tbh I'm not sure if it was worth it...
2022-11-15Rollup merge of #104380 - rust-lang:notriddle/code-opacity, r=GuillaumeGomezMatthias Krüger-4/+0
rustdoc: remove unused CSS `code { opacity: 1 }` According to https://rust-lang.zulipchat.com/#narrow/stream/266220-rustdoc/topic/CSS.20cleanup this style was added for declarations that no longer use opacity.
2022-11-15Rollup merge of #103842 - andrewpollack:add-fuchsia-test-script, r=tmandryMatthias Krüger-2/+1095
Adding Fuchsia compiler testing script, docs Adding Fuchsia compiler testing script and related docs updates r? `@tmandry` cc. `@djkoloski`
2022-11-14Add test for #102154Nixon Enraght-Moony-0/+13
2022-11-14rustdoc: fix corner case in search keyboard commandsMichael Howell-0/+29
2022-11-14Add regression testMichael Goulet-0/+19
2022-11-14Do autoderef to match impl against rcvrMichael Goulet-0/+49
2022-11-14Rollup merge of #104378 - compiler-errors:chalk-up, r=jackh726Matthias Krüger-110/+17
Bump chalk to v0.87 1. Removes `ReEmpty` from chalk 2. Adds support for the `std::marker::Tuple` trait
2022-11-14Rollup merge of #104364 - petrochenkov:docice2, r=GuillaumeGomezMatthias Krüger-1/+22
rustdoc: Resolve doc links in external traits having local impls For external impls it was done in https://github.com/rust-lang/rust/pull/103192 right away, but the local impl case was forgotten. Fixes https://github.com/rust-lang/rust/issues/104145.
2022-11-14Rollup merge of #104350 - SparkyPotato:fix-x-wrapper, r=jyn514Matthias Krüger-4/+5
Fix x finding Python on Windows `x` searches through the path for `{dir}/python{2|3}?`, but this fails on Windows because the appropriate path is `{dir}/python.exe`. This PR adds the expected `.exe` extension on Windows while searching.
2022-11-14Rollup merge of #104349 - rustaceanclub:master, r=oli-obkMatthias Krüger-4/+4
fix some typos in comments
2022-11-14Rollup merge of #104294 - compiler-errors:inline-ct-err-in-mir-build, ↵Matthias Krüger-0/+21
r=davidtwco Don't ICE with inline const errors during MIR build Fixes #104277
2022-11-14Rollup merge of #104229 - compiler-errors:overlap-full-path, r=davidtwcoMatthias Krüger-75/+75
Don't print full paths in overlap errors We don't print the full path in other diagnostics -- I don't think it particularly helps with the error message. I also delayed the printing until actually needing to render the error message. r? diagnostics
2022-11-14Rollup merge of #104223 - fmease:recover-fn-ptr-with-generics, r=estebankMatthias Krüger-0/+142
Recover from function pointer types with generic parameter list Give a more helpful error when encountering function pointer types with a generic parameter list like `fn<'a>(&'a str) -> bool` or `fn<T>(T) -> T` and suggest moving lifetime parameters to a `for<>` parameter list. I've added a bunch of extra code to properly handle (unlikely?) corner cases like `for<'a> fn<'b>()` (where there already exists a `for<>` parameter list) correctly suggesting `for<'a, 'b> fn()` (merging the lists). If you deem this useless, I can simplify the code by suggesting nothing at all in this case. I am quite open to suggestions regarding the wording of the diagnostic messages. Fixes #103487. ``@rustbot`` label A-diagnostics r? diagnostics
2022-11-14Fix missing minification for static filesGuillaume Gomez-2/+6
2022-11-14Auto merge of #104387 - Manishearth:rollup-9e551p5, r=Manishearthbors-35/+626
Rollup of 9 pull requests Successful merges: - #103709 (ci: Upgrade dist-x86_64-netbsd to NetBSD 9.0) - #103744 (Upgrade cc for working is_flag_supported on cross-compiles) - #104105 (llvm: dwo only emitted when object code emitted) - #104158 (Return .efi extension for EFI executable) - #104181 (Add a few known-bug tests) - #104266 (Regression test for coercion of mut-ref to dyn-star) - #104300 (Document `Path::parent` behavior around relative paths) - #104304 (Enable profiler in dist-s390x-linux) - #104362 (Add `delay_span_bug` to `AttrWrapper::take_for_recovery`) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2022-11-14Auto merge of #104188 - jyn514:download-config-only, r=Mark-Simulacrumbors-637/+663
Make all download functions need only Config, not Builder This also adds a new `mod download` instead of scattering the download code across `config.rs` and `native.rs`. This is the simplest and also most bit-rotty part of https://github.com/rust-lang/rust/pull/102282. Opening it earlier so it's not mixed in with behavior changes and to avoid rebase hell. cc https://github.com/rust-lang/rust/issues/94829 (which nows has the hackmd linked). r? `@Mark-Simulacrum`
2022-11-13Make all download functions need only Config, not BuilderJoshua Nelson-637/+663
This also adds a new `mod download` instead of scattering the download code across `config.rs` and `native.rs`.
2022-11-13Rollup merge of #104304 - uweigand:s390x-profiler, r=Mark-SimulacrumManish Goregaokar-1/+1
Enable profiler in dist-s390x-linux Build the profiler runtime to allow using -C profile-generate and -C instrument-coverage on s390x-linux. I've verified in a local build that the runtime builds and the profiler is working fine on the platform.
2022-11-13Rollup merge of #104266 - compiler-errors:issue-102430, r=Mark-SimulacrumManish Goregaokar-0/+32
Regression test for coercion of mut-ref to dyn-star Closes #102430
2022-11-13Rollup merge of #104181 - jackh726:known-bug-tests, r=Mark-SimulacrumManish Goregaokar-0/+373
Add a few known-bug tests The labels of these tests should be changed from `S-bug-has-mcve` to `S-bug-has-test` once this is merged. cc: #101518 #99492 #90950 #89196 #104034 #101350 #103705 #103899 I couldn't reproduce the failures in #101962 and #100772 (so either these have started passing, or I didn't repro properly), so leaving those out for now. #102065 was a bit more complicated, since it uses `rustc_private` and I didn't want to mess with that.
2022-11-13Rollup merge of #104158 - Ayush1325:executable, r=Mark-SimulacrumManish Goregaokar-1/+7
Return .efi extension for EFI executable Originally part of https://github.com/rust-lang/rust/pull/100316 Signed-off-by: Ayush Singh <ayushsingh1325@gmail.com>
2022-11-13Rollup merge of #104105 - davidtwco:split-dwarf-lto, r=michaelwoeristerManish Goregaokar-14/+197
llvm: dwo only emitted when object code emitted Fixes #103932. `CompiledModule` should not think a DWARF object was emitted when a bitcode-only compilation has happened, this can confuse archive file creation (which expects to create an archive containing non-existent dwo files). r? ``````@michaelwoerister``````
2022-11-13Rollup merge of #103709 - cuviper:netbsd-9, r=pietroalbiniManish Goregaokar-19/+16
ci: Upgrade dist-x86_64-netbsd to NetBSD 9.0 This is another step in toolchain upgrades for LLVM 16, which will need at least GCC 7.1. Our previous NetBSD 8.0 cross-toolchain used its system GCC 5.5. While there are newer versions available in pkgsrc, I could not get those working for cross-compilation. Upgrading to NetBSD 9.0 gets us GCC 7.4, which is sufficient for now. This will affect the compatibility of the build we ship for `x86_64-unknown-netbsd`, but others may still build their own from source if that is needed. It is expected that NetBSD 8 will reach EOL soon anyway, approximately one month after 10 is released, but there is no firm date for that.
2022-11-14Auto merge of #103858 - Mark-Simulacrum:bump-bootstrap, r=pietroalbinibors-338/+338
Bump bootstrap compiler to 1.66 This PR: - Bumps version placeholders to release - Bumps to latest beta - cfg-steps code r? `@pietroalbini`
2022-11-13Add a few known-bug testsJack Huey-0/+373
2022-11-13Fix clippy and rustdocMaybe Waffle-6/+6
please, please, don't match on `Symbol::as_str`s, every time you do, somewhere in the world another waffle becomes sad...
2022-11-13rustdoc: remove unused CSS `code { opacity: 1 }`Michael Howell-4/+0
According to https://rust-lang.zulipchat.com/#narrow/stream/266220-rustdoc/topic/CSS.20cleanup this style was added for declarations that no longer use opacity.
2022-11-13Auto merge of #103894 - mati865:gnullvm-libunwind-changes, r=thomccbors-1/+0
Change the way libunwind is linked for *-windows-gnullvm targets I have no idea why previous way works for `x86_64-fortanix-unknown-sgx` (assuming it actually works...) but not for `gnullvm`. It fails when linking libtest during Rust build (unless somebody adds `RUSTFLAGS='-Clinkarg=-lunwind'`). Also fixes exception handling on AArch64.
2022-11-13Make rustc build with new chalkMichael Goulet-110/+17
2022-11-13Auto merge of #104370 - matthiaskrgr:rollup-c3b38sm, r=matthiaskrgrbors-1/+13
Rollup of 5 pull requests Successful merges: - #103996 (Add small clarification around using pointers derived from references) - #104315 (Improve spans with `use crate::{self}`) - #104320 (Use `derive_const` and rm manual StructuralEq impl) - #104357 (add is_sized method on Abi and Layout, and use it) - #104365 (Add x tool to triagebot) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2022-11-13Rollup merge of #104357 - RalfJung:is-sized, r=cjgillotMatthias Krüger-1/+1
add is_sized method on Abi and Layout, and use it This avoids the double negation of `!is_unsized()` that we have quite a lot.
2022-11-13Rollup merge of #104315 - SparkyPotato:fix-104276, r=cjgillotMatthias Krüger-0/+12
Improve spans with `use crate::{self}` Fixes #104276. The error becomes: ``` error: crate root imports need to be explicitly named: `use crate as name;` --> src/lib.rs.rs:1:13 | 1 | use crate::{self}; | ^^^^ warning: unused import: `self` --> src/lib.rs:1:13 | 1 | use crate::{self}; | ^^^^ | = note: `#[warn(unused_imports)]` on by default ```
2022-11-13Auto merge of #104292 - GuillaumeGomez:fix-missing-reexports-doc-comments, ↵bors-7/+121
r=notriddle Fix missing reexports' doc comments Fixes #81893. The issue was that an import directly "links" to the target without the intermediate imports. Unfortunately, to fix this bug we need to go through them one by one. To do so, I take the import path direct parent (so `b` in `a::b::c`) and then look for `c` into it. r? `@notriddle`
2022-11-13rustdoc: Resolve doc links in external traits having local implsVadim Petrochenkov-1/+22
2022-11-13add is_sized method on Abi and Layout, and use itRalf Jung-1/+1
2022-11-13use `EXE_EXTENSION` while searching for pythonSparkyPotato-4/+5
2022-11-13Auto merge of #104351 - JohnTitor:rollup-ikh2dzr, r=JohnTitorbors-177/+237
Rollup of 5 pull requests Successful merges: - #103650 (rustdoc: change `.src-line-numbers > span` to `.src-line-numbers > a`) - #104177 (rustdoc: use consistent "popover" styling for notable traits) - #104318 (Move tests) - #104323 (rustdoc: remove no-op CSS `.scrape-help { background: transparent }`) - #104345 (Fix up a Fluent message) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2022-11-13move span to `self` instead of `crate`SparkyPotato-0/+12
2022-11-13Rollup merge of #104345 - fmease:fix-up-a-fluent-message, r=compiler-errorsYuki Okushi-1/+29
Fix up a Fluent message Fix up a Fluent message which contained arrows `->` after [selectors](https://projectfluent.org/fluent/guide/selectors.html). The original author probably thought that they were required as part of the selector syntax but in reality they were interpreted as literal text and actually showed up in the emitted diagnostic. This wasn't caught during the diagnostic migration since the branch constructing the diagnostic in question (`rustc_infer::errors::LifetimeMismatchLabels::Normal`) was not exercised by the UI test suite. I've added two more test cases to do so (one testing `LifetimeMismatchLabels::Normal` where `hir_equal == true` and one where `hir_equal == false`). Diff visualizing the `->` bug (`master` vs `fix-up-a-fluent-message`): ```diff error[E0623]: lifetime mismatch --> src/test/ui/implied-bounds/hrlt-implied-trait-bounds-guard.rs:39:30 | 39 | fn badboi3<'in_, 'out, T>(a: Foo<'in_, 'out, (&'in_ T, &'out T)>, sadness: &'in_ T) { | ^^^^^^^^^^^^^^^^^-------^^-------^^ | | | | | these two types are declared with different lifetimes... - | ...but data-> from `a` flows-> into `a` here + | ...but data from `a` flows into `a` here ```
2022-11-13Rollup merge of #104323 - notriddle:notriddle/scrape-help-background, ↵Yuki Okushi-1/+0
r=GuillaumeGomez rustdoc: remove no-op CSS `.scrape-help { background: transparent }` It's a link. This is the default CSS for it.
2022-11-13Rollup merge of #104318 - c410-f3r:moar-errors, r=petrochenkovYuki Okushi-1/+1
Move tests r? `@petrochenkov` https://github.com/rust-lang/rust/pull/46521 -> enum-discriminant
2022-11-13Rollup merge of #104177 - notriddle:notriddle/js-notable-trait-v2, ↵Yuki Okushi-130/+134
r=GuillaumeGomez rustdoc: use consistent "popover" styling for notable traits Follow-up to #104129 Fixes https://github.com/rust-lang/rust/issues/104313. Preview: https://notriddle.com/notriddle-rustdoc-demos/js-notable-trait-v2/std/iter/trait.Iterator.html#method.step_by ## Before ![image](https://user-images.githubusercontent.com/1593513/200710372-d2d992ce-0bdc-4437-9a2e-379a29df09cf.png) ![image](https://user-images.githubusercontent.com/1593513/200711266-e372b176-daa9-45f3-a022-738ef0a77d3c.png) ## After ![image](https://user-images.githubusercontent.com/1593513/200710601-09b3b717-116f-43c6-b14f-34a8b02b33c0.png) ![image](https://user-images.githubusercontent.com/1593513/200711288-3978cdc1-a6c2-47f6-9216-e22e3c1f5bdf.png)
2022-11-13Rollup merge of #103650 - notriddle:notriddle/line-anchors, r=GuillaumeGomezYuki Okushi-44/+73
rustdoc: change `.src-line-numbers > span` to `.src-line-numbers > a` Example: https://notriddle.com/notriddle-rustdoc-demos/line-anchors/test_dingus/fn.test.html This allows people to treat them like real links, such as right-click to copy URL, and makes the line numbers in a scraped example work at all, when before this commit was added, they had the clickable pointer cursor but did not actually do anything when clicked.
2022-11-13fix some typos in commentscui fliter-4/+4
Signed-off-by: cui fliter <imcusg@gmail.com>