Commit Graph

207617 Commits

Author SHA1 Message Date
Guillaume Gomez
f528414e40 Add missing checks for doc(cfg_hide(...)) attribute 2022-10-14 11:29:54 +02:00
bors
1755c85302 Auto merge of #102684 - JhonnyBillM:delete-target-data-layout-errors-wrapper, r=davidtwco
Move `IntoDiagnostic` conformance for `TargetDataLayoutErrors` into `rustc_errors`

Addressed this suggestion https://github.com/rust-lang/rust/pull/101558#issuecomment-1243830009.

This way we comply with the Coherence rule given that `IntoDiagnostic` trait is defined in `rustc_errors`, and almost all other crates depend on it.
2022-10-14 04:35:22 +00:00
bors
edabf59ca4 Auto merge of #103026 - matthiaskrgr:rollup-gfmlfkt, r=matthiaskrgr
Rollup of 7 pull requests

Successful merges:

 - #103000 (Add suggestion to the "missing native library" error)
 - #103006 (rustdoc: don't ICE on `TyKind::Typeof`)
 - #103008 (replace ReErased with fresh region vars in opaque types)
 - #103011 (Improve rustdoc `unsafe-fn` GUI test)
 - #103013 (Add new bootstrap entrypoints to triagebot)
 - #103016 (Ensure enum cast moves)
 - #103021 (Add links to relevant pages to find constraint information)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
2022-10-14 01:28:06 +00:00
Matthias Krüger
3f12e4bd21
Rollup merge of #103021 - GuillaumeGomez:constraint-pages, r=Amanieu
Add links to relevant pages to find constraint information

I think it can be quite helpful to find this information more quickly.

r? `@Amanieu`
2022-10-14 00:45:20 +02:00
Matthias Krüger
cf675656cb
Rollup merge of #103016 - nbdd0121:enum, r=pnkfelix
Ensure enum cast moves

Fix #102389

r? ``@pnkfelix``
2022-10-14 00:45:19 +02:00
Matthias Krüger
ea709c28c3
Rollup merge of #103013 - Nilstrieb:patch-1, r=jyn514
Add new bootstrap entrypoints to triagebot

They haven't been added yet, as seen in #103007.

r? ``@jyn514``
2022-10-14 00:45:19 +02:00
Matthias Krüger
5f156cc57b
Rollup merge of #103011 - GuillaumeGomez:improve-unsafe-fn-gui-test, r=notriddle
Improve rustdoc `unsafe-fn` GUI test

r? ``@notriddle``
2022-10-14 00:45:18 +02:00
Matthias Krüger
059bbf7ea9
Rollup merge of #103008 - aliemjay:opaque-parent-substs, r=oli-obk
replace ReErased with fresh region vars in opaque types

See inline comments.

Prior art #102943. cc ``@compiler-errors`` ``@oli-obk``

Fixes #100267
Fixes #101940
Fixes #102649
Fixes #102510
2022-10-14 00:45:18 +02:00
Matthias Krüger
9692d98e4f
Rollup merge of #103006 - WaffleLapkin:rustdoc_dont, r=compiler-errors
rustdoc: don't ICE on `TyKind::Typeof`

Fixes #102986

I'm not sure why rustdoc started seeing `TyKind::Typeof` all of a sudden (the code being editted was last touched 3 months ago), probably something to do with error recovery? idk.
2022-10-14 00:45:17 +02:00
Matthias Krüger
c7f048ea00
Rollup merge of #103000 - wesleywiser:suggest_libname, r=compiler-errors
Add suggestion to the "missing native library" error

If we fail to locate a native library that we are linking with, it could be the case the user entered a complete file name like `foo.lib` or `libfoo.a` when we expect them to simply provide `foo`.

In this situation, we now detect that case and suggest the user only provide the library name itself.
2022-10-14 00:45:17 +02:00
bors
60bd3f9677 Auto merge of #102700 - oli-obk:0xDEAD_TAIT, r=compiler-errors
Check hidden types in dead code

fixes #99490

r? `@compiler-errors`

best reviewed commit by commit
2022-10-13 22:39:05 +00:00
Guillaume Gomez
2214748ade Add links to relevant pages to find constraint information 2022-10-13 22:05:49 +02:00
Gary Guo
4a25a49edf Fix test 2022-10-13 17:46:33 +01:00
Gary Guo
247da7b18d Bless tests 2022-10-13 17:24:27 +01:00
Gary Guo
f1452fc1c9 Add test for issue 102389 2022-10-13 17:24:19 +01:00
Ali MJ Al-Nasrawy
d2d3d94332 replace ReErased with fresh region vars in opaque types 2022-10-13 19:06:21 +03:00
Gary Guo
de0396c718 Ensure enum cast moves 2022-10-13 16:44:47 +01:00
nils
6d609c5d6e
Add new bootstrap entrypoints to triagebot 2022-10-13 17:38:30 +02:00
bors
6b3ede3f7b Auto merge of #103009 - Dylan-DPC:rollup-9c2tng6, r=Dylan-DPC
Rollup of 6 pull requests

Successful merges:

 - #102765 (Suggest `==` to the first expr which has `ExprKind::Assign` kind)
 - #102854 (openbsd: don't reallocate a guard page on the stack.)
 - #102904 (Print return-position `impl Trait` in trait verbosely if `-Zverbose`)
 - #102947 (Sort elaborated existential predicates in `object_ty_for_trait`)
 - #102956 (Use `full_res` instead of `expect_full_res`)
 - #102999 (Delay `is_intrinsic` query until after we've determined the callee is a function)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
2022-10-13 14:59:39 +00:00
Maybe Waffle
577d2cfbcc Add test for issue 102986 2022-10-13 14:57:50 +00:00
Guillaume Gomez
16cfd6cc84 Improve code for unsafe-fn rustdoc GUI test 2022-10-13 16:51:04 +02:00
Guillaume Gomez
c47337e115 Update browser-ui-test version to 0.12.3 2022-10-13 16:50:11 +02:00
Dylan DPC
0f12b40bff
Rollup merge of #102999 - compiler-errors:issue-102985, r=fee1-dead
Delay `is_intrinsic` query until after we've determined the callee is a function

Fixes #102985
2022-10-13 18:19:21 +05:30
Dylan DPC
48f950c527
Rollup merge of #102956 - TaKO8Ki:fix-102946, r=fee1-dead
Use `full_res` instead of `expect_full_res`

Fixes #102946
Fixes #102978
2022-10-13 18:19:21 +05:30
Dylan DPC
42991e551b
Rollup merge of #102947 - compiler-errors:sort-elaborated-existentials, r=cjgillot
Sort elaborated existential predicates in `object_ty_for_trait`

r? `@cjgillot`

I think that #102845 caused #102933. Depending on the order that we elaborate these existential projection predicates, there's no guarantee that they'll be sorted by def id, which is what is failing the assertion in the issue.

Fixes #102933
Fixes #102973
2022-10-13 18:19:20 +05:30
Dylan DPC
dbff6a91c1
Rollup merge of #102904 - compiler-errors:rpitit-verbosely, r=cjgillot
Print return-position `impl Trait` in trait verbosely if `-Zverbose`

Makes the behavior a bit closer to regular `impl Trait` printing
2022-10-13 18:19:20 +05:30
Dylan DPC
376c81c94a
Rollup merge of #102854 - semarie:openbsd-immutablestack, r=m-ou-se
openbsd: don't reallocate a guard page on the stack.

the kernel currently enforce that a stack is immutable. calling mmap(2) or  mprotect(2) to change it will result in EPERM, which generate a panic!().

so just do like for Linux, and trust the kernel to do the right thing.
2022-10-13 18:19:19 +05:30
Dylan DPC
ad45dd1722
Rollup merge of #102765 - TaKO8Ki:follow-up-to-102708, r=compiler-errors
Suggest `==` to the first expr which has `ExprKind::Assign` kind

follow-up to #102708

[playground](https://play.rust-lang.org/?version=nightly&mode=debug&edition=2021&gist=4241dc33ed8af02e1ef530d6b14903fd)
2022-10-13 18:19:18 +05:30
bors
4891d57f7a Auto merge of #102919 - luojia65:update-stdarch, r=Amanieu
library: update stdarch submodule

It has been one month since we update `stdarch`  submodule into main branch Rust, it includes various fixes in code and more neat documents. This pull request also adds missing features to ensure we can build latest stdarch submodule.

The documents after this pull request:
<details>

![图片](https://user-images.githubusercontent.com/40385009/195123337-a6c4cfaa-a7b9-4574-b524-c43683e6540c.png)
</details>

Comparing to current nightly:
<details>

![图片](https://user-images.githubusercontent.com/40385009/195123430-e047cff1-a925-4d2d-ae1c-da9769383a9c.png)
</details>

r? `@Amanieu`
2022-10-13 12:03:46 +00:00
Wesley Wiser
097b6d3baf Add suggestion to the "missing native library" error
If we fail to locate a native library that we are linking with, it could
be the case the user entered a complete file name like `foo.lib` or
`libfoo.a` when we expect them to simply provide `foo`.

In this situation, we now detect that case and suggest the user only
provide the library name itself.
2022-10-13 07:35:36 -04:00
Maybe Waffle
3df9afcae7 rustdoc: don't ICE on TyKind::Typeof 2022-10-13 07:33:34 +00:00
bors
fa0ca783f8 Auto merge of #102655 - joboet:windows_tls_opt, r=ChrisDenton
Optimize TLS on Windows

This implements the suggestion in the current TLS code to embed the linked list of destructors in the `StaticKey` structure to save allocations. Additionally, locking is avoided when no destructor needs to be run. By using one Windows-provided `Once` per key instead of a global lock, locking is more finely-grained (this unblocks #100579).
2022-10-13 06:49:29 +00:00
bors
3cf5fc58d5 Auto merge of #102995 - JohnTitor:rollup-yomkwge, r=JohnTitor
Rollup of 7 pull requests

Successful merges:

 - #102641 (Support casting boxes to dyn*)
 - #102836 (rustc_target: Fix json target specs using LLD linker flavors in link args)
 - #102949 (should-skip-this: add missing backslash)
 - #102967 (Add test for issue 102964)
 - #102971 (tidy: error if a lang feature is already present)
 - #102974 (Fix small word dupe typos)
 - #102980 (rustdoc: merge separate `.item-info` CSS)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
2022-10-13 03:33:40 +00:00
Michael Goulet
af3c6f9a03 Delay intrinsic call until after we've determined the callee is a function 2022-10-13 03:10:00 +00:00
Michael Goulet
61f097308b Print RPITIT verbosely if -Zverbose 2022-10-13 02:31:43 +00:00
Michael Goulet
4a8cfe9d14 Sort elaborated existential predicates in object_ty_for_trait 2022-10-13 02:21:15 +00:00
luojia65
59fea7ecf4 library: update stdarch submodule
add feature target_feature_11 and riscv_target_feature
2022-10-13 09:41:16 +08:00
Yuki Okushi
e8029368d3
Rollup merge of #102980 - notriddle:notriddle/content, r=GuillaumeGomez
rustdoc: merge separate `.item-info` CSS

Rough timeline:

* The longer `.content .item-info` selector originated in 110e7270ab. No reason seems to be given in the PR why it needed the `.content` part, but it was probably added because of <110e7270ab/src/librustdoc/html/static/rustdoc.css (L476-L478)>. That selector with the margin-bottom was removed when CSS containment was added in 8846c0853d.
* `.stability` was renamed `.item-info` in caf6c5790a.
* The selector without the `.content` was added in d48a39a5e2.
2022-10-13 09:41:28 +09:00
Yuki Okushi
0ace46f98c
Rollup merge of #102974 - Rageking8:fix-small-word-dupe-typos, r=JohnTitor
Fix small word dupe typos
2022-10-13 09:41:27 +09:00
Yuki Okushi
18b1342f23
Rollup merge of #102971 - est31:tidy_duplicate_lang_features, r=jyn514
tidy: error if a lang feature is already present

If a lang feature gets declared twice, like for example as a result of a mistake during stabilization, emit an error in tidy. Library features already have this logic.

Inspired by a mistake done during `half_open_range_patterns` stabilization: https://github.com/rust-lang/rust/pull/102275/files#r991292215

The PR requires #102883 to be merged before CI turns green because the check is doing its job.

For reviewers, I suggest [turning off whitespace changes](https://github.com/rust-lang/rust/pull/102971/files?w=1) in the diff by adding `?w=1` to the url, as a large part of the diff is just about removing one level of indentation.
2022-10-13 09:41:27 +09:00
Yuki Okushi
36ea7cd88c
Rollup merge of #102967 - Rageking8:add-test-for-issue-102964, r=TaKO8Ki
Add test for issue 102964

Fixes #102964
2022-10-13 09:41:26 +09:00
Yuki Okushi
3c8c997d0d
Rollup merge of #102949 - RalfJung:should-skip-this, r=Dylan-DPC
should-skip-this: add missing backslash

I screwed this up in https://github.com/rust-lang/rust/pull/102780.

r? ``@Mark-Simulacrum``
2022-10-13 09:41:26 +09:00
Yuki Okushi
f4c9580c65
Rollup merge of #102836 - petrochenkov:jsonspec, r=eholk
rustc_target: Fix json target specs using LLD linker flavors in link args

Fixes https://github.com/rust-lang/rust/pull/101988#issuecomment-1272407248 (a regression introduced by https://github.com/rust-lang/rust/pull/101988).
2022-10-13 09:41:25 +09:00
Yuki Okushi
6755c2a89d
Rollup merge of #102641 - eholk:dyn-star-box, r=compiler-errors
Support casting boxes to dyn*

Boxes have a pointer type at codegen time which LLVM does not allow to be transparently converted to an integer. Work around this by inserting a `ptrtoint` instruction if the argument is a pointer.

r? ``@compiler-errors``

Fixes #102427
2022-10-13 09:41:25 +09:00
bors
2a9217601c Auto merge of #102372 - abrown:issue-102157, r=thomcc
Allow compiling the `wasm32-wasi` std library with atomics

The issue #102157 demonstrates how currently the `-Z build-std` option will fail when re-compiling the standard library with `RUSTFLAGS` like `RUSTFLAGS="-C target-feature=+atomics,+bulk-memory -C link-args=--shared-memory"`. This change attempts to resolve those build issues by depending on the the WebAssembly `futex` module and providing an implementation for `env_lock`. Fixes #102157.
2022-10-13 00:37:28 +00:00
Eric Holk
8b2c3ebb86 Add a fixme 2022-10-12 14:26:22 -07:00
est31
c278700af4 tidy: error if a lang feature is already present
If a lang feature gets declared twice, like for example as
a result of a mistake during stabilization, emit an error
in tidy. Library features already have this logic.
2022-10-12 23:09:23 +02:00
bors
0938e1680d Auto merge of #101679 - compiler-errors:rpitit-default-body, r=nikomatsakis
Support default-body trait functions with return-position `impl Trait` in traits

Introduce a new `Trait` candidate kind for the `ImplTraitInTrait` projection candidate, which just projects an RPITIT down to its opaque type form.

This is a hack until we lower RPITITs to regular associated types, after which we will need to rework how these default bodies are type-checked, so comments are left in a few places for us to clean up later.

Fixes #101665
2022-10-12 21:03:47 +00:00
Jhonny Bill Mena
be221573c8 UPDATE - Move IntoDiagnosticArg implementations to diagnostic_impls file 2022-10-12 16:55:28 -04:00
Jhonny Bill Mena
5645cd5b09 ADD - IntoDiagnostic conformance for TargetDataLayoutErrors in rustc_errors
This way we comply with the Coherence rule given that IntoDiagnostic trait is defined in rustc_errors, and almost all other crates depend on it.
2022-10-12 16:54:25 -04:00