]> git.lizzy.rs Git - rust.git/log
rust.git
21 months agoWrapper suggestions
mejrs [Sun, 25 Sep 2022 22:55:35 +0000 (00:55 +0200)]
Wrapper suggestions

21 months agorustdoc: remove `clean::TraitWithExtraInfo`
Michael Howell [Tue, 27 Sep 2022 19:27:04 +0000 (12:27 -0700)]
rustdoc: remove `clean::TraitWithExtraInfo`

Instead, it gathers the extra info later, when it's actually requested.

21 months agoBless stats.
Camille GILLOT [Tue, 27 Sep 2022 18:29:24 +0000 (20:29 +0200)]
Bless stats.

21 months agoImplement IntoDiagnosticArg for rustc_ast::token::Token(Kind)
Xiretza [Thu, 22 Sep 2022 16:39:17 +0000 (18:39 +0200)]
Implement IntoDiagnosticArg for rustc_ast::token::Token(Kind)

21 months agoDon't unnecessarily stringify paths in diagnostics
Xiretza [Wed, 14 Sep 2022 18:11:42 +0000 (20:11 +0200)]
Don't unnecessarily stringify paths in diagnostics

21 months agoDocument use of Symbol::to_string()
Xiretza [Wed, 14 Sep 2022 16:35:22 +0000 (18:35 +0200)]
Document use of Symbol::to_string()

21 months agoMigrate even more diagnostics in rustc_parse to diagnostic structs
Xiretza [Thu, 8 Sep 2022 16:23:31 +0000 (18:23 +0200)]
Migrate even more diagnostics in rustc_parse to diagnostic structs

21 months agoMigrate "struct literal body without path" error to diagnostic struct
Xiretza [Sun, 4 Sep 2022 18:19:49 +0000 (20:19 +0200)]
Migrate "struct literal body without path" error to diagnostic struct

21 months agoMigrate "expected semicolon" diagnostics to diagnostic structs
Xiretza [Sun, 4 Sep 2022 18:12:00 +0000 (20:12 +0200)]
Migrate "expected semicolon" diagnostics to diagnostic structs

21 months agoMigrate "expected identifier" diagnostics to diagnostic structs
Xiretza [Sun, 4 Sep 2022 08:14:00 +0000 (10:14 +0200)]
Migrate "expected identifier" diagnostics to diagnostic structs

21 months agoRework "inner attribute not permitted" errors
Xiretza [Wed, 31 Aug 2022 11:20:59 +0000 (13:20 +0200)]
Rework "inner attribute not permitted" errors

21 months agoRemove error condition in parse_attribute
Xiretza [Thu, 1 Sep 2022 17:29:59 +0000 (19:29 +0200)]
Remove error condition in parse_attribute

This function is only ever called when the `#` has already been
consumed, no need to produce an error message here.

21 months agoMigrate more rustc_parse diagnostics to diagnostic structs
Xiretza [Thu, 1 Sep 2022 17:29:23 +0000 (19:29 +0200)]
Migrate more rustc_parse diagnostics to diagnostic structs

21 months agoMove rustc_parse diagnostic structs to separate module
Xiretza [Tue, 30 Aug 2022 11:19:17 +0000 (13:19 +0200)]
Move rustc_parse diagnostic structs to separate module

21 months agoMigrate "invalid literal suffix" diagnostic to diagnostic structs
Xiretza [Thu, 15 Sep 2022 08:12:09 +0000 (10:12 +0200)]
Migrate "invalid literal suffix" diagnostic to diagnostic structs

21 months agoMigrate more diagnostics in rustc_parse to diagnostic structs
Xiretza [Wed, 24 Aug 2022 20:41:51 +0000 (22:41 +0200)]
Migrate more diagnostics in rustc_parse to diagnostic structs

21 months agoAllow raw identifiers to be used as fluent arguments
Xiretza [Wed, 14 Sep 2022 18:12:22 +0000 (20:12 +0200)]
Allow raw identifiers to be used as fluent arguments

21 months agoImplement IntoDiagnosticArg for rustc_ast::Path
Xiretza [Wed, 14 Sep 2022 17:22:20 +0000 (19:22 +0200)]
Implement IntoDiagnosticArg for rustc_ast::Path

21 months agoMigrate rustc_session::expr_parentheses_needed to Subdiagnostic struct
Xiretza [Thu, 25 Aug 2022 08:58:53 +0000 (10:58 +0200)]
Migrate rustc_session::expr_parentheses_needed to Subdiagnostic struct

21 months agoAdd GUI regression test for search results colors
Guillaume Gomez [Tue, 27 Sep 2022 18:23:00 +0000 (20:23 +0200)]
Add GUI regression test for search results colors

21 months agoFix regression for results colors
Guillaume Gomez [Tue, 27 Sep 2022 18:22:46 +0000 (20:22 +0200)]
Fix regression for results colors

21 months agorustdoc: remove redundant `#help-button` CSS
Michael Howell [Tue, 27 Sep 2022 17:52:08 +0000 (10:52 -0700)]
rustdoc: remove redundant `#help-button` CSS

When the separate top and bottom styles were added in
cd3f4da244578a2ab4d17d10016c61b9191b21e4, some of the CSS rules were
needlessly duplicated.

The `text-align: initial` rule on `.side-by-side` was always redundant, since
the rules that centered the text were set on children, not parents.

21 months agoUpdate src/test/rustdoc-gui/sidebar-mobile-scroll.goml
Jacob Hoffman-Andrews [Tue, 27 Sep 2022 17:25:25 +0000 (10:25 -0700)]
Update src/test/rustdoc-gui/sidebar-mobile-scroll.goml

Co-authored-by: Michael Howell <michael@notriddle.com>
21 months agoSupport bindings with anon consts in generics
Michael Goulet [Mon, 26 Sep 2022 23:57:33 +0000 (23:57 +0000)]
Support bindings with anon consts in generics

21 months agoMake type_of work correctly for const arg bindings
Michael Goulet [Mon, 26 Sep 2022 23:44:43 +0000 (23:44 +0000)]
Make type_of work correctly for const arg bindings

21 months agoFormat type_of
Michael Goulet [Mon, 26 Sep 2022 23:39:27 +0000 (23:39 +0000)]
Format type_of

21 months agoDeny associated type bindings within associated type bindings
Michael Goulet [Tue, 27 Sep 2022 00:45:50 +0000 (00:45 +0000)]
Deny associated type bindings within associated type bindings

21 months agoDo not overwrite binders for another HirId.
Camille GILLOT [Mon, 5 Sep 2022 15:21:19 +0000 (17:21 +0200)]
Do not overwrite binders for another HirId.

21 months agoUpdate cargo
Weihang Lo [Tue, 27 Sep 2022 16:46:34 +0000 (17:46 +0100)]
Update cargo

22 commits in 73ba3f35e0205844418260722c11602113179c4a..f5fed93ba24607980647962c59863bbabb03ce14
2022-09-18 06:38:16 +0000 to 2022-09-27 12:03:57 +0000

- build-scripts.md: Use em dash consistently. (rust-lang/cargo#11150)
- Indicate how Cargo locates the manifest (rust-lang/cargo#10770)
- Reduce references to `[project]` within cargo (rust-lang/cargo#11135)
- Iteratively construct target cfg (rust-lang/cargo#11114)
- update comment about `CARGO_BIN_EXE_` (rust-lang/cargo#11146)
- Call out that not all config values can be set via env vars (rust-lang/cargo#11139)
- Bump to 0.67.0, update changelog (rust-lang/cargo#11137)
- ci: update toolchain for building api doc (rust-lang/cargo#11134)
- Http publish not noop (rust-lang/cargo#11111)
- Improve errors for TOML fields that support workspace inheritance (rust-lang/cargo#11113)
- switch to `std::task::ready!()` where possible (rust-lang/cargo#11130)
- Report cmd aliasing failure with more contexts (rust-lang/cargo#11087)
- minor: remove unused mut (rust-lang/cargo#11127)
- fix(cli): Forward non-UTF8 arguments to external subcommands (rust-lang/cargo#11118)
- This change adds an example to the authors attribute in the manifest. (rust-lang/cargo#10938)
- Add support for relative git submodule paths (rust-lang/cargo#11106)
- make unknown features on `cargo add` more discoverable (rust-lang/cargo#11098)
- Unlink old final artifacts before compilation (rust-lang/cargo#11122)
- refactor(cli): Prepare for clap v4 (rust-lang/cargo#11116)
- fix(cli): Error trailing args rather than ignore (rust-lang/cargo#11119)
- Add a minor clarification (rust-lang/cargo#11093)
- doc(changelog): mention CVE fixes (rust-lang/cargo#11104)

21 months agorustdoc: use CSS containment to speed up render
Jacob Hoffman-Andrews [Tue, 27 Sep 2022 16:21:24 +0000 (09:21 -0700)]
rustdoc: use CSS containment to speed up render

https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Containment

This affected layout a little and required adjustments to the CSS to
keep spacing the same. In particular, the margins of adjacent items
usually overlap with each other. However, when an item has contain:
layout, any margins of child nodes push out the size of the item itself.
This was making spacing between items a little too big. To solve that, I
removed margins in some places: in particular for certain classes that
often occur at the end of a `details.rustdoc-toggle` block, I removed
their bottom margin. Generally, the margins provided by the next item
down are sufficient.

Also remove an unnecessary margin-top on .code-header.

21 months agoimprove errors for incomplete functions in struct definitions
Takayuki Maeda [Tue, 27 Sep 2022 08:20:55 +0000 (17:20 +0900)]
improve errors for incomplete functions in struct definitions

21 months agoStabilize bench_black_box
Urgau [Sat, 24 Sep 2022 10:34:56 +0000 (12:34 +0200)]
Stabilize bench_black_box

21 months agoalso query type_uninhabited_from
Ralf Jung [Tue, 27 Sep 2022 13:59:10 +0000 (15:59 +0200)]
also query type_uninhabited_from

21 months agocore: Mark all safe intrinsics with #[rustc_safe_intrinsic]
Arthur Cohen [Thu, 18 Aug 2022 09:15:26 +0000 (11:15 +0200)]
core: Mark all safe intrinsics with #[rustc_safe_intrinsic]

21 months agoattributes: Add #[rustc_safe_intrinsic] builtin
Arthur Cohen [Wed, 17 Aug 2022 11:43:59 +0000 (13:43 +0200)]
attributes: Add #[rustc_safe_intrinsic] builtin

21 months agoRemove confusing drop.
Mara Bos [Tue, 6 Sep 2022 21:19:20 +0000 (23:19 +0200)]
Remove confusing drop.

21 months agoUpdate doc comments.
Mara Bos [Tue, 6 Sep 2022 21:15:44 +0000 (23:15 +0200)]
Update doc comments.

21 months agoTurn format arguments Vec into its own struct.
Mara Bos [Tue, 6 Sep 2022 21:15:13 +0000 (23:15 +0200)]
Turn format arguments Vec into its own struct.

With efficient lookup through a hash map.

21 months agoUpdate test.
Mara Bos [Tue, 6 Sep 2022 21:08:27 +0000 (23:08 +0200)]
Update test.

21 months agoAdd clarifying comments.
Mara Bos [Tue, 30 Aug 2022 15:26:50 +0000 (17:26 +0200)]
Add clarifying comments.

21 months agoFlatten if-let and match into one.
Mara Bos [Tue, 30 Aug 2022 15:21:41 +0000 (17:21 +0200)]
Flatten if-let and match into one.

21 months agoMove enum definition closer to its usage.
Mara Bos [Tue, 30 Aug 2022 15:18:09 +0000 (17:18 +0200)]
Move enum definition closer to its usage.

21 months agoUse if let chain.
Mara Bos [Tue, 30 Aug 2022 15:18:01 +0000 (17:18 +0200)]
Use if let chain.

21 months agoTweak comments.
Mara Bos [Sat, 27 Aug 2022 16:32:20 +0000 (18:32 +0200)]
Tweak comments.

21 months agoPrefer new_v1_formatted instead of new_v1 with duplicates.
Mara Bos [Sat, 27 Aug 2022 15:51:28 +0000 (17:51 +0200)]
Prefer new_v1_formatted instead of new_v1 with duplicates.

21 months agoFix typo.
Mara Bos [Fri, 26 Aug 2022 20:56:21 +0000 (22:56 +0200)]
Fix typo.

21 months agoMove FormatArgs structure to its own module.
Mara Bos [Fri, 26 Aug 2022 17:13:17 +0000 (19:13 +0200)]
Move FormatArgs structure to its own module.

21 months agoUpdate tests.
Mara Bos [Fri, 26 Aug 2022 16:52:08 +0000 (18:52 +0200)]
Update tests.

21 months agoRewrite and refactor format_args!() builtin macro.
Mara Bos [Mon, 8 Aug 2022 14:17:08 +0000 (16:17 +0200)]
Rewrite and refactor format_args!() builtin macro.

21 months agoAuto merge of #102306 - lcnr:rustc_hir_analysis, r=compiler-errors
bors [Tue, 27 Sep 2022 10:45:57 +0000 (10:45 +0000)]
Auto merge of #102306 - lcnr:rustc_hir_analysis, r=compiler-errors

rename rustc_typeck to rustc_hir_analysis

first part of https://github.com/rust-lang/compiler-team/issues/529

r? `@compiler-errors`

21 months agosession: remove now-unnecessary lint `#[allow]`s
David Wood [Tue, 27 Sep 2022 10:01:49 +0000 (11:01 +0100)]
session: remove now-unnecessary lint `#[allow]`s

In #101230, the internal diagnostic migration lints -
`diagnostic_outside_of_impl` and `untranslatable_diagnostic` - were
modified so that they wouldn't trigger on functions annotated with
`#[rustc_lint_diagnostics]`. However, this change has to make it into
the bootstrap compiler before the `#[allow]` annotations that it aims to
remove can be removed, which is possible now that #102051 has landed.

Signed-off-by: David Wood <david.wood@huawei.com>
21 months agorustc_typeck to rustc_hir_analysis
lcnr [Mon, 26 Sep 2022 11:00:29 +0000 (13:00 +0200)]
rustc_typeck to rustc_hir_analysis

21 months agoAuto merge of #102314 - TaKO8Ki:add-label-to-struct-enum-union-ident, r=estebank
bors [Tue, 27 Sep 2022 07:30:11 +0000 (07:30 +0000)]
Auto merge of #102314 - TaKO8Ki:add-label-to-struct-enum-union-ident, r=estebank

Add a label to struct/enum/union ident name

Based on https://github.com/rust-lang/rust/pull/94996#discussion_r831694150
cc: `@estebank`

21 months agoTweak `FulfillProcessor`.
Nicholas Nethercote [Tue, 27 Sep 2022 03:24:49 +0000 (13:24 +1000)]
Tweak `FulfillProcessor`.

Avoids some unnecessary references and lifetimes.

21 months agoFix an incorrect comment.
Nicholas Nethercote [Tue, 27 Sep 2022 05:25:34 +0000 (15:25 +1000)]
Fix an incorrect comment.

If a `\x` escape occurs in a non-byte literals (e.g. char literal,
string literal), it must be <= 0xff.

21 months agoAuto merge of #102189 - davidtwco:translation-derive-enums, r=compiler-errors
bors [Tue, 27 Sep 2022 04:39:25 +0000 (04:39 +0000)]
Auto merge of #102189 - davidtwco:translation-derive-enums, r=compiler-errors

macros: diagnostic derive on enums

Part of #100717.

Extends `#[derive(Diagnostic)]` to work on enums too where each variant acts like a distinct diagnostic - being able to represent diagnostics this way can be quite a bit simpler for some parts of the compiler.

r? `@compiler-errors`
cc `@Xiretza`

21 months agoAdd negation methods for signed non-zero integers.
John Millikin [Sun, 18 Sep 2022 01:51:36 +0000 (10:51 +0900)]
Add negation methods for signed non-zero integers.

21 months agolint and remove unused diagnostic
Ellis Hoag [Tue, 27 Sep 2022 02:57:40 +0000 (19:57 -0700)]
lint and remove unused diagnostic

21 months agoStructured suggestion for missing mut/const in pointer
Michael Goulet [Sun, 25 Sep 2022 22:03:39 +0000 (22:03 +0000)]
Structured suggestion for missing mut/const in pointer

21 months agoRename some variables.
Nicholas Nethercote [Tue, 27 Sep 2022 02:04:03 +0000 (12:04 +1000)]
Rename some variables.

These make the delimiter processing clearer.

21 months agoAuto merge of #102331 - notriddle:rollup-dmefd2d, r=notriddle
bors [Tue, 27 Sep 2022 01:58:36 +0000 (01:58 +0000)]
Auto merge of #102331 - notriddle:rollup-dmefd2d, r=notriddle

Rollup of 6 pull requests

Successful merges:

 - #102283 (Improve code example for Option::unwrap_or_default)
 - #102319 (rustdoc: merge CSS `table` rules into `.docblock`)
 - #102321 ( Rustdoc-Json: List impls for primitives)
 - #102322 (Document that Display automatically implements ToString)
 - #102325 (rustdoc: give `.line-number` / `.line-numbers` meaningful names)
 - #102326 (rustdoc: Update doc comment for splitn_mut to include mutable in the …)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup

21 months agofix a ui test
Takayuki Maeda [Mon, 26 Sep 2022 14:43:31 +0000 (23:43 +0900)]
fix a ui test

21 months agoadd a label to struct/enum/union ident name
Takayuki Maeda [Mon, 26 Sep 2022 14:13:38 +0000 (23:13 +0900)]
add a label to struct/enum/union ident name

21 months agocreate a new local var
Takayuki Maeda [Mon, 26 Sep 2022 14:13:09 +0000 (23:13 +0900)]
create a new local var

21 months agoremove implied link bound per review
Matthew Kelly [Tue, 27 Sep 2022 00:50:33 +0000 (20:50 -0400)]
remove implied link bound per review

also update .stderr outputs

21 months agoMerge remote-tracking branch 'origin/master' into mpk/add-long-error-message-for...
Matthew Kelly [Mon, 26 Sep 2022 23:59:52 +0000 (19:59 -0400)]
Merge remote-tracking branch 'origin/master' into mpk/add-long-error-message-for-E0311

21 months agoMinor improvements.
Nicholas Nethercote [Mon, 26 Sep 2022 23:53:04 +0000 (09:53 +1000)]
Minor improvements.

Add some comments, and mark one path as unreachable.

21 months agoAvoid LLVM-deprecated `Optional::hasValue`
Josh Stone [Mon, 26 Sep 2022 23:51:18 +0000 (16:51 -0700)]
Avoid LLVM-deprecated `Optional::hasValue`

LLVM 15 added `Optional::has_value`, and LLVM `main` (16) has deprecated
`hasValue`. However, its `explicit operator bool` does the same thing,
and was added long ago, so we can use that across our full LLVM range of
compatibility.

21 months agoAuto merge of #102283 - GuillaumeGomez:option-code-example-unwrap-or-default, r=thomcc
bors [Mon, 26 Sep 2022 23:17:52 +0000 (23:17 +0000)]
Auto merge of #102283 - GuillaumeGomez:option-code-example-unwrap-or-default, r=thomcc

Improve code example for Option::unwrap_or_default

Fixes #100054.
Follow-up of #102259.

r? `@thomcc`

21 months agoRollup merge of #102326 - yancyribbens:splin-mut-doc-change, r=thomcc
Michael Howell [Mon, 26 Sep 2022 22:40:55 +0000 (15:40 -0700)]
Rollup merge of #102326 - yancyribbens:splin-mut-doc-change, r=thomcc

rustdoc: Update doc comment for splitn_mut to include mutable in the …

The doc comment for [splitn](https://github.com/rust-lang/rust/blob/master/library/core/src/slice/mod.rs#L2051:L2056) is the exact same as the comment for [splitn_mut](https://github.com/rust-lang/rust/blob/master/library/core/src/slice/mod.rs#L2079:L2084).  The doc comment for `splitn_mut` should instead say it's working on a mutable subslice.

21 months agoRollup merge of #102325 - notriddle:notriddle/line-number, r=GuillaumeGomez
Michael Howell [Mon, 26 Sep 2022 22:40:55 +0000 (15:40 -0700)]
Rollup merge of #102325 - notriddle:notriddle/line-number, r=GuillaumeGomez

rustdoc: give `.line-number` / `.line-numbers` meaningful names

21 months agoRollup merge of #102322 - sigaloid:master, r=GuillaumeGomez
Michael Howell [Mon, 26 Sep 2022 22:40:54 +0000 (15:40 -0700)]
Rollup merge of #102322 - sigaloid:master, r=GuillaumeGomez

Document that Display automatically implements ToString

Closes #92941

r? rust-lang/docs

21 months agoRollup merge of #102321 - aDotInTheVoid:rdj-prim-impls, r=GuillaumeGomez
Michael Howell [Mon, 26 Sep 2022 22:40:54 +0000 (15:40 -0700)]
Rollup merge of #102321 - aDotInTheVoid:rdj-prim-impls, r=GuillaumeGomez

 Rustdoc-Json: List impls for primitives

 Closes #101695

 Partially addresses #100961

r? ``@GuillaumeGomez``

21 months agoRollup merge of #102319 - notriddle:notriddle/td-th, r=GuillaumeGomez
Michael Howell [Mon, 26 Sep 2022 22:40:53 +0000 (15:40 -0700)]
Rollup merge of #102319 - notriddle:notriddle/td-th, r=GuillaumeGomez

rustdoc: merge CSS `table` rules into `.docblock`

This was added in 510107815fe888319028c5e96001cdee70e7a931, to fix the display of the module items and search results tables (see the discussion in https://github.com/rust-lang/rust/pull/86725).

Those aren't tables any more. The only remaining table is in docblock, which has its own padding declarations.

21 months agoRollup merge of #102283 - GuillaumeGomez:option-code-example-unwrap-or-default, r...
Michael Howell [Mon, 26 Sep 2022 22:40:52 +0000 (15:40 -0700)]
Rollup merge of #102283 - GuillaumeGomez:option-code-example-unwrap-or-default, r=thomcc

Improve code example for Option::unwrap_or_default

Fixes #100054.
Follow-up of #102259.

r? ``@thomcc``

21 months agorustdoc: remove no-op CSS `.srclink { font-weight; font-size }`
Michael Howell [Mon, 26 Sep 2022 22:28:26 +0000 (15:28 -0700)]
rustdoc: remove no-op CSS `.srclink { font-weight; font-size }`

When this CSS was added in 34bd2b845b3acd84c5a9bddae3ff8081c19ec5e9, source
links were nested below headers.

https://github.com/rust-lang/rust/blob/34bd2b845b3acd84c5a9bddae3ff8081c19ec5e9/src/librustdoc/html/render.rs#L4015-L4019

Now, thanks to 458e7219bc2a62f72368279945cfda632a016da1, they are now
siblings of headers, and thanks to
270d09dca9aae263671c4d32bbc7cb60dc378af8, they have the same font size that
they would've had anyway.

21 months agoEnable inline stack probes on PowerPC and SystemZ
Josh Stone [Mon, 26 Sep 2022 20:40:24 +0000 (13:40 -0700)]
Enable inline stack probes on PowerPC and SystemZ

21 months agoAuto merge of #102324 - matthiaskrgr:rollup-6l70oz3, r=matthiaskrgr
bors [Mon, 26 Sep 2022 19:57:51 +0000 (19:57 +0000)]
Auto merge of #102324 - matthiaskrgr:rollup-6l70oz3, r=matthiaskrgr

Rollup of 5 pull requests

Successful merges:

 - #101875 (Allow more `!Copy` impls)
 - #101996 (Don't duplicate region names for late-bound regions in print of Binder)
 - #102181 (Add regression test)
 - #102273 (Allow `~const` bounds on non-const functions)
 - #102286 (Recover some items that expect braces and don't take semicolons)

Failed merges:

 - #102314 (Add a label to struct/enum/union ident name)

r? `@ghost`
`@rustbot` modify labels: rollup

21 months agorustdoc: simplify example-line-numbers CSS selector
Michael Howell [Mon, 26 Sep 2022 19:21:27 +0000 (12:21 -0700)]
rustdoc: simplify example-line-numbers CSS selector

21 months agorustdoc: give `.line-number` / `.line-numbers` meaningful names
Michael Howell [Mon, 26 Sep 2022 17:50:51 +0000 (10:50 -0700)]
rustdoc: give `.line-number` / `.line-numbers` meaningful names

21 months agorustdoc: Update doc comment for splitn_mut to include mutable in the description
yancy [Mon, 26 Sep 2022 18:20:13 +0000 (20:20 +0200)]
rustdoc: Update doc comment for splitn_mut to include mutable in the description

21 months agoRollup merge of #102286 - compiler-errors:recover-semi-in-block-item, r=davidtwco
Matthias Krüger [Mon, 26 Sep 2022 17:19:21 +0000 (19:19 +0200)]
Rollup merge of #102286 - compiler-errors:recover-semi-in-block-item, r=davidtwco

Recover some items that expect braces and don't take semicolons

Fixes #102262

21 months agoRollup merge of #102273 - woppopo:relax_const_bound, r=fee1-dead
Matthias Krüger [Mon, 26 Sep 2022 17:19:21 +0000 (19:19 +0200)]
Rollup merge of #102273 - woppopo:relax_const_bound, r=fee1-dead

Allow `~const` bounds on non-const functions

Makes the behavior of bound of trait-associated functions and non-associated functions consistent.

21 months agoRollup merge of #102181 - inquisitivecrystal:issue-100878-test, r=Mark-Simulacrum
Matthias Krüger [Mon, 26 Sep 2022 17:19:20 +0000 (19:19 +0200)]
Rollup merge of #102181 - inquisitivecrystal:issue-100878-test, r=Mark-Simulacrum

Add regression test

This adds a regression test for issue #100878.

Closes #100878.

21 months agoRollup merge of #101996 - b-naber:binder-print, r=lcnr
Matthias Krüger [Mon, 26 Sep 2022 17:19:20 +0000 (19:19 +0200)]
Rollup merge of #101996 - b-naber:binder-print, r=lcnr

Don't duplicate region names for late-bound regions in print of Binder

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

21 months agoRollup merge of #101875 - fmease:allow-more-negative-copy-impls, r=lcnr
Matthias Krüger [Mon, 26 Sep 2022 17:19:19 +0000 (19:19 +0200)]
Rollup merge of #101875 - fmease:allow-more-negative-copy-impls, r=lcnr

Allow more `!Copy` impls

You can already implement `!Copy` for a lot of types (with `#![feature(negative_impls)]`). However, before this PR you could not implement `!Copy` for ADTs whose fields don't implement `Copy` which didn't make any sense. Further, you couldn't implement `!Copy` for types impl'ing `Drop` (equally nonsensical).

``@rustbot`` label T-types F-negative_impls
Fixes #101836.

r? types

21 months agoAuto merge of #102257 - cjgillot:let-else-lint, r=dingxiangfei2009
bors [Mon, 26 Sep 2022 17:17:07 +0000 (17:17 +0000)]
Auto merge of #102257 - cjgillot:let-else-lint, r=dingxiangfei2009

Fix lint scoping for let-else.

The scoping for let-else is inconsistent with HIR nesting.  This creates cases, in `ui/let-else/let-else-allow-unused.rs` for instance, where an `allow` lint attribute does not apply to the bindings created by `let-else`.

This PR is an attempt to correct this.

As there is no lint that currently relies on this, the test for this behaviour is https://github.com/rust-lang/rust/pull/101500.

cc `@dingxiangfei2009` as you filed https://github.com/rust-lang/rust/pull/101894

21 months ago Rustdoc-Json: List impls for primitives
Nixon Enraght-Moony [Mon, 26 Sep 2022 17:06:48 +0000 (18:06 +0100)]
 Rustdoc-Json: List impls for primitives

 Closes #101695

21 months agoDocument that Display entails ToString
Matthew Esposito [Mon, 26 Sep 2022 16:50:45 +0000 (12:50 -0400)]
Document that Display entails ToString

21 months agorustdoc: merge `table { border-collapse } into `.docblock table`
Michael Howell [Mon, 26 Sep 2022 16:54:44 +0000 (09:54 -0700)]
rustdoc: merge `table { border-collapse } into `.docblock table`

This was added in 510107815fe888319028c5e96001cdee70e7a931, to fix the
display of the module items and search results tables (see the discussion in
https://github.com/rust-lang/rust/pull/86725).

Those aren't tables any more. The only remaining table is in docblock, which
needs this attribute to look right.

21 months agorustdoc: remove unneeded CSS `td, th { padding 0 }`
Michael Howell [Mon, 26 Sep 2022 16:20:20 +0000 (09:20 -0700)]
rustdoc: remove unneeded CSS `td, th { padding 0 }`

This was added in 510107815fe888319028c5e96001cdee70e7a931, to fix
the display of the module items and search results tables (see the discussion
in https://github.com/rust-lang/rust/pull/86725).

Those aren't tables any more. The only remaining table is in docblock, which
has its own padding declarations.

21 months agoAuto merge of #102051 - pietroalbini:pa-bootstrap-update, r=Mark-Simulacrum
bors [Mon, 26 Sep 2022 14:22:43 +0000 (14:22 +0000)]
Auto merge of #102051 - pietroalbini:pa-bootstrap-update, r=Mark-Simulacrum

Update bootstrap compiler to 1.65.0

This PR updates the bootstrap compiler to Rust 1.65.0, removing the various `cfg(bootstrap)`s.

r? `@Mark-Simulacrum`

21 months agoaddress review
b-naber [Wed, 21 Sep 2022 15:57:30 +0000 (17:57 +0200)]
address review

21 months agoAuto merge of #102184 - chenyukang:fix-102087-add-binding-sugg, r=nagisa
bors [Mon, 26 Sep 2022 11:41:58 +0000 (11:41 +0000)]
Auto merge of #102184 - chenyukang:fix-102087-add-binding-sugg, r=nagisa

Suggest Default::default() when binding isn't initialized

Fixes #102087

21 months agobless tests
b-naber [Sun, 18 Sep 2022 20:02:56 +0000 (22:02 +0200)]
bless tests

21 months agodon't duplicate late-bound region names in print of Binder
b-naber [Thu, 15 Sep 2022 16:46:40 +0000 (18:46 +0200)]
don't duplicate late-bound region names in print of Binder

21 months agomacros: support diagnostic derive on enums
David Wood [Fri, 23 Sep 2022 11:49:02 +0000 (12:49 +0100)]
macros: support diagnostic derive on enums

Signed-off-by: David Wood <david.wood@huawei.com>
21 months agoremove outdated coherence hack
lcnr [Mon, 26 Sep 2022 10:41:12 +0000 (12:41 +0200)]
remove outdated coherence hack

21 months agoImprove code example for Option::unwrap_or_default
Guillaume Gomez [Sun, 25 Sep 2022 21:58:33 +0000 (23:58 +0200)]
Improve code example for Option::unwrap_or_default

21 months agoactually fix line number
Pietro Albini [Fri, 23 Sep 2022 08:40:36 +0000 (10:40 +0200)]
actually fix line number