Commit Graph

219422 Commits

Author SHA1 Message Date
Adrian Heine
c84c5e6439 rustdoc: Don't crash on crate references in blocks
This is a regression from #94857.
2023-03-10 17:49:13 +01:00
bors
35a0961bbc Auto merge of #108977 - matthiaskrgr:rollup-1bnl1hu, r=matthiaskrgr
Rollup of 9 pull requests

Successful merges:

 - #108879 (Unconstrained terms should account for infer vars being equated)
 - #108936 (Rustdoc: don't hide anonymous reexport)
 - #108940 (Add myself to compiler reviewers list)
 - #108945 (Make some report and emit errors take DefIds instead of BodyIds)
 - #108946 (Document the resulting values produced when using `From<bool>` on floats)
 - #108956 (Make ptr::from_ref and ptr::from_mut in #106116 const.)
 - #108960 (Remove `body_def_id` from `Inherited`)
 - #108963 (only call git on git checkouts during bootstrap)
 - #108964 (Fix the docs for pointer method with_metadata_of)

Failed merges:

 - #108950 (Directly construct Inherited in typeck.)

r? `@ghost`
`@rustbot` modify labels: rollup
2023-03-10 15:39:25 +00:00
Léo Lanteri Thauvin
ad2bcb5c0e Forbid #[target_feature] on safe default implementations 2023-03-10 13:50:51 +01:00
Ayush Singh
45d50216a9
Split __thread_local_inner macro
Split the __thread_local_inner macro to make it more readable. Also move
everything to crate::sys::common::thread_local.

Signed-off-by: Ayush Singh <ayushsingh1325@gmail.com>
2023-03-10 17:35:24 +05:30
Ayush Singh
ffa9019134
Move __thread_local_inner to sys
Move __thread_local_inner macro in crate:🧵:local to crate::sys.
Currently, the tidy check does not fail for `library/std/src/thread/local.rs` even though it contains platform specific code. This is beacause target_family did not exist at the time the tidy checks were written [1].

[1]: https://github.com/rust-lang/rust/pull/105861#discussion_r1125841678

Signed-off-by: Ayush Singh <ayushsingh1325@gmail.com>
2023-03-10 17:35:24 +05:30
bors
d5833423a0 Auto merge of #102256 - cjgillot:let-under, r=lcnr
Introduce a no-op `PlaceMention` statement for `let _ =`.

Fixes https://github.com/rust-lang/rust/issues/54003
Fixes https://github.com/rust-lang/rust/issues/80059
Split from https://github.com/rust-lang/rust/pull/101500

This PR introduces a new `PlaceMention` statement dedicated to matches that neither introduce bindings nor ascribe types.  Without this, all traces of the match would vanish from MIR, making it impossible to diagnose unsafety or use in #101500.

This allows to mark `let _ = <unsafe union access or dereference>` as requiring an unsafe block.
Nominating for lang team, as this introduces an extra error.
2023-03-10 11:55:59 +00:00
Matthias Krüger
df74b70b9e
Rollup merge of #108964 - majaha:ptr_metadata_doc, r=workingjubilee
Fix the docs for pointer method with_metadata_of

The name of the argument to `{*const T, *mut T}::with_metadata_of` was changed from `val` to `meta` recently, but the docs weren't updated to match.

Relevant pull request: #103701
2023-03-10 12:32:02 +01:00
Matthias Krüger
7918df5f57
Rollup merge of #108963 - jhheider:fix-CI-non-git-builds, r=albertlarsan68
only call git on git checkouts during bootstrap

fixes https://github.com/rust-lang/rust/issues/108959
2023-03-10 12:32:02 +01:00
Matthias Krüger
671339cdb0
Rollup merge of #108960 - compiler-errors:no-body-def-id, r=cjgillot
Remove `body_def_id` from `Inherited`

We can just use the body id from the obligation cause.

Follow-up to #108945, only my commit is relevant.

r? `@cjgillot` cc `@spastorino`
2023-03-10 12:32:01 +01:00
Matthias Krüger
65db3cb794
Rollup merge of #108956 - Raekye:master, r=scottmcm
Make ptr::from_ref and ptr::from_mut in #106116 const.

As per https://github.com/rust-lang/rust/issues/106116#issuecomment-1462571833
2023-03-10 12:32:01 +01:00
Matthias Krüger
e0c8ba1929
Rollup merge of #108946 - bmoxb:bool-to-float-docs, r=cuviper
Document the resulting values produced when using `From<bool>` on floats

Have the documentation of the implementation of `From<bool>` on `f32` and `f64` indicate the output values (`0.0` for `false` and `1.0` for `true`).

closes #108939
2023-03-10 12:32:00 +01:00
Matthias Krüger
afd8558d62
Rollup merge of #108945 - spastorino:pass-def-id-instead-of-using-hir-id, r=compiler-errors
Make some report and emit errors take DefIds instead of BodyIds

Breaking off from #108915

r? `@compiler-errors`
2023-03-10 12:31:59 +01:00
Matthias Krüger
63c6a341f5
Rollup merge of #108940 - b-naber:reviewers-list, r=compiler-errors
Add myself to compiler reviewers list
2023-03-10 12:31:59 +01:00
Matthias Krüger
6ef07c2df1
Rollup merge of #108936 - GuillaumeGomez:rustdoc-anonymous-reexport, r=notriddle
Rustdoc: don't hide anonymous reexport

Fixes https://github.com/rust-lang/rust/issues/108931.

From https://github.com/rust-lang/rust/issues/108931, it appears that having anonymous re-exports for traits is actually used in some places, so instead of hiding them automatically, we should prevent them to be ever inlined.

r? `@notriddle`
2023-03-10 12:31:58 +01:00
Matthias Krüger
4bd32ac31d
Rollup merge of #108879 - compiler-errors:constrained-root-var, r=lcnr
Unconstrained terms should account for infer vars being equated

Follow-up from the canonicalization PR, wanted to break this one out so I can approve the other PR.

r? `@lcnr`
2023-03-10 12:31:58 +01:00
Lukas Wirth
a818484991
Update triagebot rust-analyzer team mention
The working group got renamed
2023-03-10 11:22:27 +01:00
Philipp Krones
a87abc2de4
Update Cargo.lock (Clippy version) 2023-03-10 10:54:09 +01:00
Philipp Krones
01ffa51366
Merge commit '3c06e0b1ce003912f8fe0536d3a7fe22558e38cf' into clippyup 2023-03-10 10:53:50 +01:00
lcnr
14818e28d1
updating comment
Co-authored-by: Ruby Lazuli <general@patchmixolydic.com>
2023-03-10 10:49:05 +01:00
bors
3c06e0b1ce Auto merge of #10275 - Alexendoo:format-args-ast, r=flip1995
Migrate `write.rs` to `rustc_ast::FormatArgs`

changelog: none

Part 1 of #10233

The additions to `clippy_utils` are the main novelty of this PR, there's no removals yet since other parts still rely on `FormatArgsExpn`

The changes to `write.rs` itself are relatively straightforward this time around, as there's no lints in it that rely on type checking format params

r? `@flip1995`
2023-03-10 09:38:18 +00:00
bors
991610a9ec Auto merge of #10473 - flip1995:rustup, r=flip1995
Rustup

r? `@ghost`

changelog: none
2023-03-10 09:23:09 +00:00
Philipp Krones
f3074c4b91
Bump nightly version -> 2023-03-10 2023-03-10 10:22:33 +01:00
Philipp Krones
ec9029d12c
Bump Clippy version -> 0.1.70 2023-03-10 10:22:27 +01:00
Philipp Krones
baa997caf6
Merge remote-tracking branch 'upstream/master' into rustup 2023-03-10 10:22:18 +01:00
bors
a7fae6e417 Auto merge of #10471 - xFrednet:00000-mark-version-as-released, r=flip1995
Mark Rust 1.68.0 as release in the changelog

Roses are red,
this poem is dead,
my creativity is lost,
outside there is frost?

Maybe I should really stop including a "roses are red" with every changelog PR. These are getting worse every time...

---

changelog: none
<!-- changelog_checked -->
2023-03-10 08:46:32 +00:00
bors
104f4300cf Auto merge of #108934 - matthiaskrgr:rollup-vm414p5, r=matthiaskrgr
Rollup of 8 pull requests

Successful merges:

 - #106915 (Only load one CSS theme by default)
 - #108294 (Place binder correctly for arbitrary trait bound suggestion)
 - #108778 (x fmt: Don't print all modified files if there's more than 10)
 - #108854 (feat/refactor: improve errors in case of ident with number at start)
 - #108870 (Fix invalid inlining of reexport of reexport of private item)
 - #108917 (Consider target_family as pal)
 - #108922 (Add auto notification for changes to stable mir)
 - #108929 (Fix typo in span_map.rs)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
2023-03-10 08:09:25 +00:00
Ezra Shaw
a30c2c26c0
feat: implement better error for manual impl of Fn* traits 2023-03-10 20:32:24 +13:00
Michael Goulet
a8f905cdd9 Unconstrained terms should account for infer vars being equated 2023-03-10 04:08:09 +00:00
bors
f37f854994 Auto merge of #108951 - cuviper:solaris-debs, r=Mark-Simulacrum
ci: use `apt install --download-only` for solaris debs
2023-03-10 03:23:00 +00:00
Matt Harding
ccb552e4f5 Fix docs for ptr method with_metadata_of() 2023-03-10 02:14:09 +00:00
Jacob Heider
54e5c19f08
only call git on git checkouts 2023-03-09 20:15:40 -05:00
Collin Baker
cb41803899 Don't export of __rust_* alloc symbols if not codegened 2023-03-09 19:21:44 -05:00
Collin Baker
9bb87eb681 Add soon-to-be-default --no-undefined-version flag 2023-03-09 19:21:43 -05:00
Michael Goulet
fd34549686 Remove body_def_id from Inherited 2023-03-09 23:25:23 +00:00
xFrednet
7ce9ca0508
Mark Rust 1.68.0 as release in the changelog 2023-03-09 23:09:51 +01:00
Raekye
e8fbf6205e Make ptr::from_ref and ptr::from_mut in #106116 const. 2023-03-09 16:36:20 -05:00
Urgau
3455d66041 Honor current target when checking conditional compilation values
This is fixed by simply using the currently registered target in the
current session. We need to use it because of target json that are not
by design included in the rustc list of targets.
2023-03-09 21:55:00 +01:00
Santiago Pastorino
5b99723439
Make some report and emit errors take DefIds instead of BodyIds 2023-03-09 17:53:35 -03:00
Michael Goulet
f7146136d7 Bail in combine if consts have different types 2023-03-09 20:52:06 +00:00
Michael Goulet
9574f39c2d Use param's real type in try_eval_lit_or_param 2023-03-09 20:49:11 +00:00
bmoxb
b439189236 Add examples section which demonstrates the behaviour (specifically the sign positive aspect) 2023-03-09 20:44:11 +00:00
bmoxb
8d2bdb89c6 Add missing comment for f64 2023-03-09 20:37:04 +00:00
bmoxb
73016bb8d4 Indicate that 0.0 refers to positive 0.0 2023-03-09 20:36:29 +00:00
Josh Stone
258c7e73c4 ci: use apt install --download-only for solaris debs 2023-03-09 12:23:18 -08:00
bmoxb
d5bb6056f1 Document the resulting values produced when using From<bool> on floats 2023-03-09 18:55:33 +00:00
Camille GILLOT
684de0418f Update coverage info. 2023-03-09 17:51:38 +00:00
Camille GILLOT
2eccd52157 Test let _ = for const_mut_refs. 2023-03-09 17:45:13 +00:00
Camille GILLOT
09dc10c9c2 Bug on PlaceMention in dest-prop. 2023-03-09 17:45:13 +00:00
Camille GILLOT
45f2a1af3b Document borrowck behaviour. 2023-03-09 17:45:13 +00:00
Camille GILLOT
b34a8a294d Pacify tidy. 2023-03-09 17:45:13 +00:00