Lukas Markeffsky
f4ff423d67
fix documenting private items of standard library
2022-12-28 09:18:43 -05:00
Lukas Markeffsky
fdf6cc34b2
delete more cfg(bootstrap)
2022-12-28 09:18:43 -05:00
Pietro Albini
11191279b7
Update bootstrap cfg
2022-12-28 09:18:43 -05:00
Pietro Albini
060a6ead83
bump stage0
2022-12-28 09:18:43 -05:00
Pietro Albini
f6762c2035
update stabilization version numbers
2022-12-28 09:18:42 -05:00
bors
266eef7701
Auto merge of #10119 - koka831:doc/config-default-value, r=xFrednet
...
fix codeblocks in the document
While I've looked into https://github.com/rust-lang/rust-clippy/issues/9990 , I found broken code blocks in the document.
This patch not only improves visibility, but also fixes a potential bug. When a lint description ends with code block, the string will have three backquotes at the end.
Since the current implementation prints the default value immediately after that, the markdown renderer is unable to properly close the code block.
e.g. `arithmetic_side_effects`, we can see code block is not rendered properly, and (I think) it's bit hard to understand what ``"defaults to `[]`"`` is meant.

In this PR, it will be rendered as:

changelog: none
r? `@xFrednet`
2022-12-28 13:53:34 +00:00
Matthias Krüger
d37cb3ff89
Rollup merge of #106199 - estebank:quiet-type-err-in-binding, r=compiler-errors
...
Silence knock-down errors on `[type error]` bindings
Fix #56036 , fix #76589 .
2022-12-28 14:40:03 +01:00
Matthias Krüger
08e2e4e4e4
Rollup merge of #106194 - notriddle:notriddle/sidebar-background, r=GuillaumeGomez
...
rustdoc: combine common sidebar background color CSS rules
2022-12-28 14:40:02 +01:00
Matthias Krüger
d07be1a304
Rollup merge of #106176 - compiler-errors:fn-kw-as-fn-trait, r=estebank
...
Recover `fn` keyword as `Fn` trait in bounds
`impl fn()` -> `impl Fn()`
Fixes #82515
2022-12-28 14:40:01 +01:00
Matthias Krüger
c991c243b7
Rollup merge of #106173 - compiler-errors:deduplicate-op-methods, r=jackh726
...
Deduplicate `op` methods
There are some operator-checking flavored methods in `FnCtxt` that can be deduplicated.
2022-12-28 14:40:01 +01:00
Matthias Krüger
31f5e753fb
Rollup merge of #106172 - estebank:suggest-impl-trait, r=compiler-errors
...
Suggest `impl Iterator` when possible for `_` return type
Address #106096 .
2022-12-28 14:40:00 +01:00
Matthias Krüger
f33ea418e2
Rollup merge of #106028 - Ezrashaw:add-docs+test-e0461, r=GuillaumeGomez
...
docs/test: add UI test and long-form error docs for `E0461`
Might take a couple of tries to pass CI. The UI test is x86-linux only; I'm not sure how to generalize it to other architectures.
r? ``@GuillaumeGomez``
2022-12-28 14:40:00 +01:00
bors
83a28ef095
Auto merge of #106129 - compiler-errors:compare_method-tweaks, r=BoxyUwU
...
Some `compare_method` tweaks
1. Make some of the comparison functions' names more regular
2. Reduce pub scope of some of the things in `compare_method`
~3. Remove some unnecessary opaque type handling code -- `InferCtxt` already is in a mode that doesn't define opaque types~
* moved to a different PR
4. Bubble up `ErrorGuaranteed` for region constraint errors in `compare_method` - Improves a redundant error message in one unit test.
5. Move the `compare_method` module to have a more general name, since it's more like `compare_impl_item` :)
6. Rename `collect_trait_impl_trait_tys`
2022-12-28 13:07:30 +00:00
Nikita Tomashevich
0c50e1f146
eager is the default now
2022-12-28 15:24:18 +03:00
Nikita Tomashevich
2a8b17dbc5
Fix formatting
2022-12-28 14:53:48 +03:00
Nikita Tomashevich
dda3ebad0a
Fix broken rebase
2022-12-28 14:53:48 +03:00
Nikita Tomashevich
a86173766c
Fix nits
2022-12-28 14:53:48 +03:00
Nikita Tomashevich
62f9962eaf
Made ty_or_sig and trait_path use their actual types instead of String
2022-12-28 14:53:48 +03:00
Nikita Tomashevich
7ecd064bbe
Split infer_explicit_lifetime_required into several diags
2022-12-28 14:53:48 +03:00
Nikita Tomashevich
19b8579803
Address changes of pr 103345
2022-12-28 14:53:48 +03:00
Nikita Tomashevich
40b221814e
Rename subdiagnostic fields that do not need to be unique now
2022-12-28 14:53:48 +03:00
Nikita Tomashevich
eb7ce1703b
Use eager translation
2022-12-28 14:53:47 +03:00
Nikita Tomashevich
71d24da665
Split into several messages
2022-12-28 14:53:47 +03:00
Nikita Tomashevich
6c19c08140
More descriptive names for ActualImplExplNotes variants
2022-12-28 14:53:47 +03:00
Nikita Tomashevich
57fdd196ae
Rebase and fix
2022-12-28 14:53:47 +03:00
Nikita Tomashevich
0634b0119c
Partial work on static_impl_trait.rs
2022-12-28 14:53:47 +03:00
Nikita Tomashevich
3935a81d47
Migrate trait_impl_difference.rs
2022-12-28 14:53:47 +03:00
Nikita Tomashevich
2118ff401f
Migrate placeholder_error.rs
2022-12-28 14:53:47 +03:00
Nikita Tomashevich
8360a40a8a
Migrate named_anon_conflict.rs
2022-12-28 14:53:47 +03:00
bors
fba3d79df0
Auto merge of #2743 - RalfJung:path-join, r=RalfJung
...
simplify path joining code a bit
2022-12-28 11:45:18 +00:00
Ralf Jung
041ad1fcfe
simplify path joining code a bit
2022-12-28 12:44:41 +01:00
bors
6a20f7df57
Auto merge of #106209 - fee1-dead-contrib:rollup-47ysdcu, r=fee1-dead
...
Rollup of 9 pull requests
Successful merges:
- #94145 (Test leaking of BinaryHeap Drain iterators)
- #103945 (Remove `iter::Empty` hack)
- #104024 (Fix `unused_must_use` warning for `Box::from_raw`)
- #104708 (Fix backoff doc to match implementation)
- #105347 (Account for `match` expr in single line)
- #105484 (Implement allow-by-default `multiple_supertrait_upcastable` lint)
- #106184 (Fix `core::any` docs)
- #106201 (Emit fewer errors on invalid `#[repr(transparent)]` on `enum`)
- #106205 (Remove some totally duplicated files in `rustc_infer`)
Failed merges:
r? `@ghost`
`@rustbot` modify labels: rollup
2022-12-28 10:10:09 +00:00
bors
fbdf926e70
Auto merge of #2742 - RalfJung:targets, r=RalfJung
...
handle unknown targets more gracefully
In particular don't require a list of all OSes in the TLS machinery. Instead just fall back to doing nothing.
2022-12-28 09:51:40 +00:00
Ralf Jung
7bdb5da916
handle unknown targets more gracefully
2022-12-28 10:51:13 +01:00
Ralf Jung
b804c0d5a5
adjust message on non-unwinding panic
2022-12-28 10:38:04 +01:00
Deadbeef
983606d367
Allow trait method paths to satisfy const Fn bounds
2022-12-28 09:06:31 +00:00
fee1-dead
5e9c91c6dd
Rollup merge of #106205 - compiler-errors:oopsy, r=fee1-dead
...
Remove some totally duplicated files in `rustc_infer`
I have no idea why or how I duplicated these files from `compiler/rustc_infer/src/infer/error_reporting/note.rs`, but I did by accident, and nothing caught it 🤦
2022-12-28 15:51:43 +08:00
fee1-dead
f837da736f
Rollup merge of #106201 - estebank:verbose-transparent, r=compiler-errors
...
Emit fewer errors on invalid `#[repr(transparent)]` on `enum`
Fix #68420 .
2022-12-28 15:51:42 +08:00
fee1-dead
45d6f02ea5
Rollup merge of #106184 - albertlarsan68:docs-106154, r=Nilstrieb
...
Fix `core::any` docs
Thanks to ``@pbevin`` in #106154
Closes #106154
``@rustbot`` labels +A-docs
2022-12-28 15:51:42 +08:00
fee1-dead
8b3d0c4cf9
Rollup merge of #105484 - nbdd0121:upcast, r=compiler-errors
...
Implement allow-by-default `multiple_supertrait_upcastable` lint
The lint detects when an object-safe trait has multiple supertraits.
Enabled in libcore and liballoc as they are low-level enough that many embedded programs will use them.
r? `@nikomatsakis`
2022-12-28 15:51:41 +08:00
fee1-dead
ade9605a08
Rollup merge of #105347 - estebank:single-line-match, r=compiler-errors
...
Account for `match` expr in single line
When encountering `match Some(42) { Some(x) => x, None => "" };`, output
```
error[E0308]: `match` arms have incompatible types
--> f53.rs:2:52
|
2 | let _ = match Some(42) { Some(x) => x, None => "" };
| -------------- - ^^ expected integer, found `&str`
| | |
| | this is found to be of type `{integer}`
| `match` arms have incompatible types
```
2022-12-28 15:51:40 +08:00
fee1-dead
0818ba43a4
Rollup merge of #104708 - jonasspinner:fix-backoff-doc-to-match-implementation, r=compiler-errors
...
Fix backoff doc to match implementation
The commit 8dddb22943
in the crossbeam-channel PR (#93563 ) changed the backoff strategy to be quadratic instead of exponential. This updates the doc to prevent confusion.
2022-12-28 15:51:40 +08:00
fee1-dead
58233e90b8
Rollup merge of #104024 - noeddl:unused-must-use, r=compiler-errors
...
Fix `unused_must_use` warning for `Box::from_raw`
2022-12-28 15:51:39 +08:00
fee1-dead
d1193ad1e6
Rollup merge of #103945 - H4x5:remove-iter-empty-hack, r=compiler-errors
...
Remove `iter::Empty` hack
`iter::Empty` uses a newtype to work around `#![feature(const_fn_fn_ptr_basics)]`, which has been stable since 1.61.0.
2022-12-28 15:51:38 +08:00
fee1-dead
dc98aa681f
Rollup merge of #94145 - ssomers:binary_heap_tests, r=jyn514
...
Test leaking of BinaryHeap Drain iterators
Add test cases about forgetting the `BinaryHeap::Drain` iterator, and slightly fortifies some other test cases.
Consists of separate commits that I don't think are relevant on their own (but I'll happily turn these into more PRs if desired).
2022-12-28 15:51:37 +08:00
bors
9b889e53e7
Auto merge of #103881 - ChayimFriedman2:patch-2, r=compiler-errors
...
Clarify docs of `RefCell`
Comparison operators only panic if the `RefCell` is mutably borrowed, and `RefCell::swap()` can also panic if swapping a `RefCell` with itself.
2022-12-28 06:56:02 +00:00
Michael Goulet
605ad65f6a
Remove some totally duplicated files
2022-12-28 05:45:12 +00:00
Michael Goulet
96d8011fa8
better names and a comment
2022-12-28 04:18:37 +00:00
Michael Goulet
c7b414adb6
Rename module compare_method -> compare_impl_item
2022-12-28 04:18:37 +00:00
Michael Goulet
91613c5030
make some things less pub
2022-12-28 04:18:37 +00:00