Commit Graph

209610 Commits

Author SHA1 Message Date
bors
1286ee23e4 Auto merge of #102458 - JohnTitor:stabilize-instruction-set, r=oli-obk
Stabilize the `instruction_set` feature

Closes https://github.com/rust-lang/rust/issues/74727
FCP is complete on https://github.com/rust-lang/rust/issues/74727#issuecomment-1242773253
r? `@pnkfelix` and/or `@nikomatsakis`
cc `@xd009642`

Signed-off-by: Yuki Okushi <jtitor@2k36.org>
2022-11-05 20:39:06 +00:00
Michael Goulet
ff8f84ccf6 Bless more tests 2022-11-05 18:05:45 +00:00
Michael Goulet
d9891563d3 Merge conflicts and rebase onto master 2022-11-05 18:05:44 +00:00
Michael Goulet
29dccfe9e4 Bless chalk tests 2022-11-05 18:05:44 +00:00
Michael Goulet
2257ba92db Adjust diagnostics, bless tests 2022-11-05 18:05:44 +00:00
Michael Goulet
99b3454d37 Enforce rust-check ABI in signatures, calls 2022-11-05 18:05:25 +00:00
bors
371100b1fb Auto merge of #104017 - matthiaskrgr:rollup-k8i0j9m, r=matthiaskrgr
Rollup of 5 pull requests

Successful merges:

 - #101702 (rustdoc: add hash to filename of toolchain files)
 - #103920 (Move browser opening logic in `Builder`)
 - #103927 (Do not make typo suggestions when suggesting pattern matching)
 - #103972 (Remove an option and choose a behaviour-preserving default instead.)
 - #103988 (Fix search result bottom border color)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
2022-11-05 17:39:16 +00:00
Michael Goulet
2786acce98 Enforce Tuple trait on Fn traits 2022-11-05 17:34:47 +00:00
viandoxdev
900af414a3
fix out dir being wrong in json 2022-11-05 18:30:01 +01:00
Matthias Krüger
e51e4a4ecf
Rollup merge of #103988 - GuillaumeGomez:fix-bottom-border-color, r=notriddle
Fix search result bottom border color

It reverts a color change while keeping the improvement made in #103938.

I think it'll need to be backported once merged too.

r? `@notriddle`
2022-11-05 18:06:07 +01:00
Matthias Krüger
cf2d88db38
Rollup merge of #103972 - oli-obk:unoptional, r=fee1-dead
Remove an option and choose a behaviour-preserving default instead.

r? ``@fee1-dead``
2022-11-05 18:06:07 +01:00
Matthias Krüger
51287f264c
Rollup merge of #103927 - fee1-dead-contrib:E0425-no-typo-when-pattern-matching, r=cjgillot
Do not make typo suggestions when suggesting pattern matching

Fixes #103909.
2022-11-05 18:06:06 +01:00
Matthias Krüger
305cb7133f
Rollup merge of #103920 - ferrocene:pa-maybe-open-in-browser, r=jyn514
Move browser opening logic in `Builder`

This allows `open()` to be called from other places in bootstrap (I need this for Ferrocene, as we keep our custom steps in `src/bootstrap/ferrocene`), and it simplifies the callers by moving the `was_invoked_explicitly` check into the function.
2022-11-05 18:06:06 +01:00
Matthias Krüger
3eac639e1e
Rollup merge of #101702 - jsha:static-files2, r=notriddle,GuillaumeGomez
rustdoc: add hash to filename of toolchain files

All static files used by rustdoc are now stored in static.files/ and their filenames include a hash of their contents. Their filenames no longer include the contents of the --resource-suffix flag. This clarifies caching semantics. Anything in static.files can use Cache-Control: immutable because any updates will show up as a new URL.

Invocation-specific files like crates-NN.js, search-index-NN.js, and sidebar-items-NN.js still get the resource suffix.

This has a useful side effect: once toolchain files aren't affected by resource suffix, it will become possible for docs.rs to include crate version in the resource suffix. That should fix a caching issue with `/latest/` URLs: https://github.com/rust-lang/docs.rs/issues/1593. My goal is that it should be safe to serve all rustdoc JS, CSS, and fonts with infinite caching headers, even when new versions of a crate are uploaded in the same place as old versions.

The --disable-minification flag is removed because it would vary the output of static files based on invocation flags. Instead, for rustdoc development purposes it's preferable to symlink static files to a non-minified copy for quick iteration.

Example listing:

```
$ cd build/x86_64-unknown-linux-gnu/doc/ && find . | egrep 'js$|css$' | egrep -v 'sidebar-items|implementors' | sort
./crates1.65.0.js
./rust.css
./search-index1.65.0.js
./source-files1.65.0.js
./static.files/ayu-2bfd0af01c176fd5.css
./static.files/dark-95d11b5416841799.css
./static.files/light-c83a97e93a11f15a.css
./static.files/main-efc63f77fb116394.js
./static.files/normalize-76eba96aa4d2e634.css
./static.files/noscript-5bf457055038775c.css
./static.files/rustdoc-7a422337900fa894.css
./static.files/scrape-examples-3dd10048bcead3a4.js
./static.files/search-47f3c289722672cf.js
./static.files/settings-17b08337296ac774.js
./static.files/settings-3f95eacb845293c0.css
./static.files/source-script-215e9db86679192e.js
./static.files/storage-26d846fcae82ff09.js
```

Fixes #98413
2022-11-05 18:06:05 +01:00
Nilstrieb
27e0f03d41
Add internal descriptions to a few queries 2022-11-05 17:54:15 +01:00
Nilstrieb
04583f29c8
Simplify code 2022-11-05 17:54:06 +01:00
Alex Gaynor
c33ee13391
Remove linuxkernel targets
These are not used by the actual Rust-for-Linux project, so they're mostly just confusing.
2022-11-05 12:30:28 -04:00
Guillaume Gomez
8e2956d4a9 Extend GUI test for run button 2022-11-05 17:22:38 +01:00
Guillaume Gomez
ffb28690aa Migrate test-arrow to CSS variables 2022-11-05 17:22:25 +01:00
Michael Howell
a69d43493a rustdoc: use ThinVec and Box<str> to shrink clean::ItemKind 2022-11-05 09:02:10 -07:00
Guillaume Gomez
666873b1bb Update GUI test for bottom border color 2022-11-05 16:43:09 +01:00
Guillaume Gomez
94ba7f09df Fix search result bottom border color 2022-11-05 16:43:08 +01:00
Deadbeef
b1994ce806 Do not make typo suggestions when suggesting pattern matching
Fixes #103909.
2022-11-05 15:33:25 +00:00
Nilstrieb
36be251a35
Merge QueryDescription into QueryConfig
`QueryDescription` has gone through a lot of refactoring and doesn't
make sense anymore.
2022-11-05 16:24:13 +01:00
Vadim Petrochenkov
43bea6cf69 resolve: Fill effective visibilities for import def ids in a separate pass
This should result in less update calls than doing it repeatedly during the fix point iteration.
2022-11-05 17:55:20 +04:00
bors
6b8d9dd0a0 Auto merge of #103831 - chenyukang:yukang/fix-103751-ice, r=nagisa
Fix capacity overflow issue during transmutability check

Fixes #103751
2022-11-05 13:48:30 +00:00
Caio
f63ac6a13f Tidy 2022-11-05 09:59:27 -03:00
Caio
c72c646625 Move some tests to more reasonable directories 2022-11-05 09:58:13 -03:00
Vadim Petrochenkov
448261a78a privacy: Check effective visibility invariants 2022-11-05 16:25:41 +04:00
Vadim Petrochenkov
bb401bd04d privacy: Print effective visibilities of constructors 2022-11-05 16:22:23 +04:00
Vadim Petrochenkov
24093fc6bd resolve: More detailed effective visibility tracking for imports
Also drop `extern` blocks from the effective visibility table, they are nominally private and it doesn't make sense to keep them there.
2022-11-05 15:46:22 +04:00
AndyJado
e49d10db14 first move on a nested span_label
Apply suggestions from code review

Co-authored-by: David Wood <agile.lion3441@fuligin.ink>
2022-11-05 19:43:48 +08:00
Ralf Jung
dad327090a fix a comment in UnsafeCell::new 2022-11-05 12:27:43 +01:00
Mateusz Mikuła
d5899efbda Update several crates for improved support of the new targets
This helps with `*-windows-gnullvm` targets
2022-11-05 12:19:55 +01:00
bors
b0f3940c35 Auto merge of #103691 - michaelwoerister:consistent-slice-and-str-cpp-like-debuginfo-names, r=wesleywiser
[debuginfo] Make cpp-like debuginfo type names for slices and str consistent.

Before this PR, the compiler would emit the debuginfo name `slice$<T>` for all kinds of slices, regardless of whether they are behind a reference or not and regardless of the kind of reference. As a consequence, the types `Foo<&[T]>`, `Foo<[T]>`, and `Foo<&mut [T]>` would end up with the same type name `Foo<slice$<T> >` in debuginfo, making it impossible to disambiguate between them by name. Similarly, `&str` would get the name `str` in debuginfo, so the debuginfo name for `Foo<str>` and `Foo<&str>` would be the same. In contrast, `*const [bool]` and `*mut [bool]` would be `ptr_const$<slice$<bool> >` and `ptr_mut$<slice$<bool> >`, i.e. the encoding does not lose information about the type.

This PR removes all special handling for slices and `str`. The types `&[bool]`, `&mut [bool]`, and `&str` thus get the names `ref$<slice2$<bool> >`, `ref_mut$<slice2$<bool> >`, and `ref$<str$>` respectively -- as one would expect.

The new special name for slices is `slice2$` to differentiate it from the previous name `slice$`, which has different semantics. The same is true for `str` and `str$`. This kind of versioning already has a precedent with the case of `enum$` and `enum2$` and hopefully will make it easier to transition existing consumers of these names.

cc `@rust-lang/wg-debugging` `@vadimcn`

r? `@wesleywiser`

UPDATE: Here is a table to clarify the changes

| Rust type | DWARF name | C++-like name (before) | C++-like name (after) |
|-----------|------------|------------------------|------------------------|
| `[T]`        | `[T]`        | `slice$<T>`              | `slice2$<T>`           |
| `&[T]`       | `&[T]`       | `slice$<T>`              | `ref$<slice2$<T> >`    |
| `&mut [T]`   | `&mut [T]`   | `slice$<T>`              | `ref_mut$<slice2$<T> >`|
| `str`        | `str`        | `str`                    | `str$`           |
| `&str`       | `&str`       | `str`                    | `ref$<str$>`    |
| `&mut str`   | `&mut str`   | `str`                    | `ref_mut$<str$>`|
| `*const [T]` | `*const [T]` | `ptr_const$<slice$<T> >` | `ptr_const$<slice2$<T> >` |
| `*mut [T]`   | `*mut [T]`   | `ptr_mut$<slice$<T> >`   | `ptr_mut$<slice2$<T> >` |

As you can see, before the PR many types would end up with the same name, making it impossible to distinguish between them in NatVis or other places where types are matched or looked up by name. The DWARF version of names is not changed.
2022-11-05 11:07:50 +00:00
bors
452cf4f710 Auto merge of #103998 - Dylan-DPC:rollup-2nbmtc9, r=Dylan-DPC
Rollup of 6 pull requests

Successful merges:

 - #103621 (Correctly resolve Inherent Associated Types)
 - #103660 (improve `filesearch::get_or_default_sysroot`)
 - #103866 (Remove some return-type diagnostic booleans from `FnCtxt`)
 - #103867 (Remove `has_errors` from `FnCtxt`)
 - #103994 (Specify that `break` cannot be used outside of loop *or* labeled block)
 - #103995 (Small round of typo fixes)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
2022-11-05 07:32:09 +00:00
Dylan DPC
47e6304e32
Rollup merge of #103995 - SUPERCILEX:typos, r=Dylan-DPC
Small round of typo fixes
2022-11-05 11:31:30 +05:30
Dylan DPC
61553d1784
Rollup merge of #103994 - clubby789:break-unlabeled, r=TaKO8Ki
Specify that `break` cannot be used outside of loop *or* labeled block

Closes #103981

`@rustbot` label +A-diagnostics
2022-11-05 11:31:30 +05:30
Dylan DPC
2d8f0838b1
Rollup merge of #103867 - compiler-errors:no-has-errors, r=cjgillot
Remove `has_errors` from `FnCtxt`

It doesn't seem like this `has_errors` flag actually suppresses any errors (at least in the UI test suite) --- except for one test (`E0767.rs`), and I think that error really should be considered legitimate, since it has nothing to do with the error code and continues to exist after you fix the first error...

This flag was added by ```@eddyb``` in 6b3cc0b8c8, and it's likely that it was made redundant due to subsequent restructuring of the compiler.

It only affects block type-checking anyways, so its effect does seem limited these days anyway.
2022-11-05 11:31:29 +05:30
Dylan DPC
9e67f6a68d
Rollup merge of #103866 - compiler-errors:fn-ctxt-less-state, r=fee1-dead
Remove some return-type diagnostic booleans from `FnCtxt`

These can be calculated on-demand
2022-11-05 11:31:29 +05:30
Dylan DPC
bd9e6e05d2
Rollup merge of #103660 - ozkanonur:master, r=jyn514
improve `filesearch::get_or_default_sysroot`

`fn get_or_default_sysroot` is now improved and used in `miri` and `clippy`, and tests are still passing as they should. So we no longer need to implement custom workarounds/hacks to find sysroot in tools like miri/clippy.

Resolves https://github.com/rust-lang/rust/issues/98832

re-opened from #103581
2022-11-05 11:31:28 +05:30
Dylan DPC
3450aa38d0
Rollup merge of #103621 - fee1-dead-contrib:iat-fix-use, r=cjgillot
Correctly resolve Inherent Associated Types

I don't know if this is the best way to do this, but at least it is one way.
2022-11-05 11:31:28 +05:30
Ali MJ Al-Nasrawy
02f78fdb94 use spans in TypeTest rather than mir::Location
Spans are independent of the body being borrow-checked, so they don't
need remapping when promoting type-tests and they yield more specific
error spans inside bodies of closures/inline consts.
2022-11-05 07:36:47 +03:00
Ali MJ Al-Nasrawy
df668b9fb9 simplify applying closure requirements
Don't use `ConstraintCategory::ClosureBounds`!
Set the category and the span for the promoted constraints to that of
the original constraint earlier than before.
This eliminates the need for `closure_bounds_mapping`.
2022-11-05 07:36:42 +03:00
bors
5b3e909075 Auto merge of #103992 - weihanglo:update-cargo, r=weihanglo
Update cargo

20 commits in 7e484fc1a766f56dbc95380f45719698e0c82749..9286a1beba5b28b115bad67de2ae91fb1c61eb0b 2022-10-27 15:20:57 +0000 to 2022-11-04 06:41:49 +0000
- chore: Upgrade dependencies (rust-lang/cargo#11328)
- Clean more aggressively in CI (rust-lang/cargo#11335)
- Remove remove_dir_all (rust-lang/cargo#11333)
- test(publish): Cover more wait-for-publish cases (rust-lang/cargo#11327)
- Revert rust-lang/cargo#11183 (rust-lang/cargo#11331)
- fix(semver-check): adapt to a different error for variant not covered (rust-lang/cargo#11332)
- Update curl-sys (rust-lang/cargo#11326)
- Mention fix on build script deadlock (rust-lang/cargo#11325)
- Make cargo forward pre-existing CARGO if set (rust-lang/cargo#11285)
- Clean up workspace dependencies after cargo remove (rust-lang/cargo#11242)
- Update the outdated link for rust-semverver (rust-lang/cargo#11322)
- Fix broken link to compilation entry point (rust-lang/cargo#11317)
- Only remove fingerprints and build script artifacts of the requested package (rust-lang/cargo#10621)
- Newer anyhow features are required (rust-lang/cargo#11316)
- Clean stale git temp files (rust-lang/cargo#11308)
- Report crate size on package and publish (rust-lang/cargo#11270)
- add a note that some warnings (and/or errors) can be auto-fixed (rust-lang/cargo#10989)
- Update libcurl (rust-lang/cargo#11307)
- artifact deps shoud works when target field specified coexists with `optional = true` (rust-lang/cargo#11183)
- Fix singular verb in tests page (rust-lang/cargo#11300)

r? `@ghost`
2022-11-05 04:01:29 +00:00
Alex Saveau
849d89b031
Small round of typo fixes
Signed-off-by: Alex Saveau <saveau.alexandre@gmail.com>
2022-11-04 20:06:18 -07:00
Nicholas Nethercote
43d21b535f Rename some result variables as res, for consistency. 2022-11-05 13:56:36 +11:00
Nicholas Nethercote
a838952239 Remove unescape_byte_literal.
It's easy to just use `unescape_literal` + `byte_from_char`.
2022-11-05 13:56:36 +11:00
bors
aebf7c4a0e Auto merge of #103991 - matthiaskrgr:rollup-tj53nte, r=matthiaskrgr
Rollup of 7 pull requests

Successful merges:

 - #103868 (Use `TraitEngine` (by itself) less)
 - #103878 (Fix artifact version/channel detection for stable)
 - #103946 (Cleanup bind_pattern args)
 - #103956 (Make mir opt unused file check blessable)
 - #103977 (LLVM 16: Switch to using MemoryEffects)
 - #103980 (rustdoc: simplify search results CSS and DOM)
 - #103984 (Refactor tcx mk_const parameters.)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
2022-11-05 01:20:41 +00:00
clubby789
2f882c014f Specify that break cannot be used outside of loop *or* labeled block 2022-11-05 01:12:58 +00:00