Commit Graph

219224 Commits

Author SHA1 Message Date
Matthias Krüger
030ea0578f
Rollup merge of #108912 - clubby789:doc-tool-lints, r=Nilstrieb
Document tool lints

Add brief doc comments for the internal tool lints so a summary can be seen without needing to open source code
2023-03-10 21:15:46 +01:00
Matthias Krüger
5e449b32b5
Rollup merge of #108902 - lcnr:do-while-sus, r=davidtwco,Nilstrieb
no more do while :<
2023-03-10 21:15:46 +01:00
Matthias Krüger
4b784e49a2
Rollup merge of #108891 - kazutakahirata:master, r=cuviper
Remove an extraneous include

SymbolWrapper.cpp doesn't use std::optional or llvm::Optional, so this patch removes the extraneous include.  Note that llvm/ADT/Optional.h has been deprecated upstream.  This patch ensures that SymbolWrapper.cpp continues to compile even after the upcoming removal of Optional.h.
2023-03-10 21:15:45 +01:00
Matthias Krüger
342ca46517
Rollup merge of #108017 - chbaker0:fix-105967, r=chbaker0
Add `--no-undefined-version` link flag and fix associated breakage

LLVM upstream sets `--no-undefined-version` by default in lld: https://reviews.llvm.org/D135402.

Due to a bug in how version scripts are generated, this breaks the `dylib` output type for most crates. See https://github.com/rust-lang/rust/issues/105967#issuecomment-1428671533 for details.

This PR adds the flag to gcc flavor linkers in anticipation of this LLVM change rolling in, and patches `rustc` to not attempt to export `__rust_*` allocator symbols when they weren't generated.

Fixes #105967
2023-03-10 21:15:45 +01:00
Matthias Krüger
93316d7f28
Rollup merge of #107711 - calebzulawski:movbe, r=pnkfelix
Stabilize movbe target feature

Almost all "old" x86 target features are stable.  As far as I can tell, these are the last two unstable features in the `x86-64-v2` or `x86-64-v3` microarchitecture levels, so I'm not sure if it was an oversight or if they're still unstable for a reason (see #106323 for `f16c`).

Note that this only stabilizes the target features, and not the intrinsics.

cc ```@Amanieu```

r? ```@rust-lang/lang```
2023-03-10 21:15:44 +01:00
Matthias Krüger
b5de0089e1
Rollup merge of #106085 - fee1-dead-contrib:tidy-ci-matchers, r=pietroalbini
use problem matchers for tidy CI
2023-03-10 21:15:44 +01:00
Matthias Krüger
a69a9b3038
Rollup merge of #105962 - zertosh:stabilize_path_as_mut_os_str, r=dtolnay
Stabilize path_as_mut_os_str

Closes #105021

r? ```@dtolnay```
2023-03-10 21:15:43 +01:00
Matthias Krüger
cb0fb246d5
Rollup merge of #105798 - Amanieu:relax-asm, r=joshtriplett
Relax ordering rules for `asm!` operands

The `asm!` and `global_asm!` macros require their operands to appear strictly in the following order:
- Template strings
- Positional operands
- Named operands
- Explicit register operands
- `clobber_abi`
- `options`

This is overly strict and can be inconvienent when building complex `asm!` statements with macros. This PR relaxes the ordering requirements as follows:
- Template strings must still come before all other operands.
- Positional operands must still come before named and explicit register operands.
- Named and explicit register operands can be freely mixed.
- `options` and `clobber_abi` can appear in any position after the template strings.

r? ```````@joshtriplett```````
2023-03-10 21:15:42 +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
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
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
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
Raekye
e8fbf6205e Make ptr::from_ref and ptr::from_mut in #106116 const. 2023-03-09 16:36:20 -05:00
Santiago Pastorino
5b99723439
Make some report and emit errors take DefIds instead of BodyIds 2023-03-09 17:53:35 -03: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
Camille GILLOT
a5ef6bac28 Also test destructuring assignment. 2023-03-09 17:45:13 +00:00
Camille GILLOT
e107194b66 Ignore AscribeUserType in unsafeck to avoid duplicate diagnostics. 2023-03-09 17:45:13 +00:00
Camille GILLOT
4462bb54e3 Introduce a no-op PlaceMention statement for let _ =. 2023-03-09 17:45:13 +00:00
Camille GILLOT
be758ef5ab Add ui test. 2023-03-09 17:45:13 +00:00
Guillaume Gomez
9b788da2da Update rustdoc anonymous reexport test and add regression test for #108931 2023-03-09 18:08:22 +01:00
Guillaume Gomez
e8bd4ef1e5 Don't hide anonymous re-exports but never inline them 2023-03-09 18:08:22 +01:00
b-naber
c6d32f4b05 add myself to compiler reviewers list 2023-03-09 16:10:24 +00:00
clubby789
3abcae2beb Document tool lints 2023-03-09 14:07:20 +00:00
lcnr
a5258d1721 no more do while 2023-03-09 12:53:03 +01:00
Matthias Krüger
5b3f84d8af
Rollup merge of #108929 - eltociear:patch-20, r=GuillaumeGomez
Fix typo in span_map.rs

correspondance -> correspondence
2023-03-09 12:11:55 +01:00
Matthias Krüger
ceff836bfe
Rollup merge of #108922 - celinval:stable-mir-bot, r=oli-obk
Add auto notification for changes to stable mir

Adds a new entry to the triagebot configuration file to notify subscribers about changes to the stable MIR. I added myself and `@oli-obk` for now.

r?oli-obk
2023-03-09 12:11:55 +01:00