Commit Graph

169085 Commits

Author SHA1 Message Date
Santiago Pastorino
67deaf9fea
instrument lower_fn_decl 2022-06-01 15:02:15 -03:00
Santiago Pastorino
2de2520e94
Split extend + inner chain into to extend calls 2022-06-01 14:48:14 -03:00
Santiago Pastorino
b3bc438f56
Add debug_assert comment
Co-authored-by: Camille Gillot <gillot.camille@gmail.com>
2022-06-01 14:43:16 -03:00
Santiago Pastorino
15f2b119b1
Fix lower_generics rustdocs 2022-05-31 17:40:50 -03:00
Santiago Pastorino
2ade55d908
Inline lower_generics_mut and remove GenericsCtor 2022-05-31 16:57:16 -03:00
Santiago Pastorino
d327db9319
Remove ImplTraitContext::reborrow 2022-05-31 16:49:27 -03:00
Santiago Pastorino
208ffbbe86
derive Copy, Clone, PartialEq, Eq for ImplTraitContext 2022-05-31 16:47:53 -03:00
Santiago Pastorino
bd3a097d64
Move lower_generics definition to item.rs 2022-05-31 15:33:51 -03:00
Santiago Pastorino
d5ab8b2f5b
Rename add_implicit_generics to lower_generics 2022-05-31 15:32:05 -03:00
Santiago Pastorino
e080298e35
Replace calls to lower_generics with calls to add_implicit_generics 2022-05-31 15:30:14 -03:00
Santiago Pastorino
190b4a7152
Add itctx: ImplTraitContext arg to add_implicit_generics 2022-05-31 14:55:49 -03:00
Santiago Pastorino
1a71103c93
Take and restore fields in with_hir_id_owner calls 2022-05-31 14:53:32 -03:00
Santiago Pastorino
3d6eae8cd2
Move defs and bounds from Universal to LoweringContext 2022-05-31 12:40:34 -03:00
bors
4a8d2e3856 Auto merge of #97480 - conradludgate:faster-format-literals, r=joshtriplett
improve format impl for literals

The basic idea of this change can be seen here https://godbolt.org/z/MT37cWoe1.

Updates the format impl to have a fast path for string literals and the default path for regular format args.

This change will allow `format!("string literal")` to be used interchangably with `"string literal".to_owned()`.

This would be relevant in the case of `f!"string literal"` being legal (https://github.com/rust-lang/rfcs/pull/3267) in which case it would be the easiest way to create owned strings from literals, while also being just as efficient as any other impl
2022-05-30 17:39:58 +00:00
bors
e810f750a2 Auto merge of #97548 - Dylan-DPC:rollup-9x0va1d, r=Dylan-DPC
Rollup of 6 pull requests

Successful merges:

 - #97494 (Use Box::new() instead of box syntax in library tests)
 - #97499 (Remove "sys isn't exported yet" phrase)
 - #97504 (Ensure source file present when calculating max line number)
 - #97519 (Re-add help_on_error for download-ci-llvm)
 - #97531 (Note pattern mismatch coming from `for` loop desugaring)
 - #97545 (Reword safety comments in core/hash/sip.rs)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
2022-05-30 14:59:12 +00:00
Dylan DPC
a352ad500d
Rollup merge of #97545 - thomcc:sip-comment-safety, r=Dylan-DPC
Reword safety comments in core/hash/sip.rs

In https://rust-lang.zulipchat.com/#narrow/stream/136281-t-lang.2Fwg-unsafe-code-guidelines/topic/Is.20there.20any.20way.20to.20soundly.20do.20a.20masked.20out-of-bounds.20read.3F/near/284329248 it came up that this is using an atypical (and somewhat vague) phrasing of the safety requirement, so this slightly rewords it.
2022-05-30 14:33:53 +02:00
Dylan DPC
65bdfe3b41
Rollup merge of #97531 - compiler-errors:for-loop-pat-mismatch, r=davidtwco
Note pattern mismatch coming from `for` loop desugaring

Fixes #97163
2022-05-30 14:33:52 +02:00
Dylan DPC
9bb3832ebd
Rollup merge of #97519 - binggh:readd-help-on-error, r=jyn514
Re-add help_on_error for download-ci-llvm

Closes #97503

- Re-added `help_on_error` for `download_component()` and the downstream functions
- Removed dead code in `bootstrap.py`

Thanks `@jyn514` for the helpful tips!

(first contribution here, please let me know if I missed anything out!)
2022-05-30 14:33:51 +02:00
Dylan DPC
106d5fde92
Rollup merge of #97504 - JohnTitor:cleanup-deps, r=davidtwco
Ensure source file present when calculating max line number

Resubmission of #89268, fixes #71363
The behavior difference of `simulate-remapped-rust-src-base` is not something we should take into account here, so limiting targets to run the test makes sense, I think.

r? `@davidtwco,` and `@estebank,` you might be interested in this change
2022-05-30 14:33:50 +02:00
Dylan DPC
8fd9e24b9a
Rollup merge of #97499 - est31:master, r=Dylan-DPC
Remove "sys isn't exported yet" phrase

The oldest occurence is from 9e224c2bf1,
which is from the pre-1.0 days. In the years since then, std::sys still
hasn't been exported, and the last attempt was met with strong criticism:
https://github.com/rust-lang/rust/pull/97151

Thus, removing the "yet" part makes a lot of sense.
2022-05-30 14:33:49 +02:00
Dylan DPC
0ed320bdb9
Rollup merge of #97494 - est31:remove_box_alloc_tests, r=Dylan-DPC
Use Box::new() instead of box syntax in library tests

The tests inside `library/*` have no reason to use `box` syntax as they have 0 performance relevance. Therefore, we can safely remove them (instead of having to use alternatives like the one in #97293).
2022-05-30 14:33:48 +02:00
bors
946a88a989 Auto merge of #97546 - RalfJung:miri, r=oli-obk
update Miri

First update with the new ui test suite, let's hope this all works. :)
r? `@oli-obk`

Fixes https://github.com/rust-lang/rust/issues/97486
2022-05-30 11:59:55 +00:00
Ralf Jung
962d54e5e8 be less redundant redundant 2022-05-30 12:35:01 +02:00
Oli Scherer
3c66939671
Let miri decide the flags to use for the test suite 2022-05-30 12:10:28 +02:00
est31
6d63d3b888 Remove "sys isn't exported yet" phrase
The oldest occurence is from 9e224c2bf1,
which is from the pre-1.0 days. In the years since then, std::sys still
hasn't been exported, and the last attempt was met with strong criticism:
https://github.com/rust-lang/rust/pull/97151

Thus, removing the "yet" part makes a lot of sense.
2022-05-30 12:07:43 +02:00
bors
5c780b98d1 Auto merge of #96964 - oli-obk:const_trait_mvp, r=compiler-errors
Replace `#[default_method_body_is_const]` with `#[const_trait]`

pulled out of #96077

related issues:  #67792 and #92158

cc `@fee1-dead`

This is groundwork to only allowing `impl const Trait` for traits that are marked with `#[const_trait]`. This is necessary to prevent adding a new default method from becoming a breaking change (as it could be a non-const fn).
2022-05-30 09:19:03 +00:00
Oli Scherer
2f96fbe220 update diagnostic message on removed attribute
Co-authored-by: fee1-dead <ent3rm4n@gmail.com>
2022-05-30 08:52:25 +00:00
Oli Scherer
0e3d8d2b13 Default methods of traits are also AssocFn defs as they essentially desugar to a method in a new impl block 2022-05-30 08:52:25 +00:00
Oli Scherer
ecaf7b7cee Reduce the scope of a mutable variable 2022-05-30 08:52:25 +00:00
Oli Scherer
4d390de4a3 Add a helper function for checking whether a default function in a trait can be treated as const 2022-05-30 08:52:25 +00:00
Deadbeef
257f06587c Remove #[default..] and add #[const_trait] 2022-05-30 08:52:24 +00:00
Ralf Jung
a272c45678 update Miri 2022-05-30 10:17:46 +02:00
Thom Chiovoloni
eeacb4403c
Reword safety comments in core/hash/sip.rs 2022-05-30 01:06:08 -07:00
bors
855fc022fe Auto merge of #97489 - GuillaumeGomez:settings-js-disabled, r=notriddle
Add sentence in case JS is disabled on settings.html page

Instead of having an empty page, it'll look like this:

![Screenshot from 2022-05-28 17-46-23](https://user-images.githubusercontent.com/3050060/170833333-e1a59c2b-27ca-47da-9c08-2356e4a689cb.png)

r? `@notriddle`
2022-05-30 04:15:10 +00:00
bors
6999ef2564 Auto merge of #97538 - compiler-errors:rollup-zp3ukke, r=compiler-errors
Rollup of 4 pull requests

Successful merges:

 - #97493 (Use `type_is_copy_modulo_regions` check in intrisicck)
 - #97518 (Fix order of closing HTML elements in rustdoc output)
 - #97530 (Add more eslint checks)
 - #97536 (Remove unused lifetimes from expand_macro)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
2022-05-29 23:25:51 +00:00
Michael Goulet
f20bbc1fb0
Rollup merge of #97536 - est31:remove_unused_lifetimes, r=compiler-errors
Remove unused lifetimes from expand_macro

The function doesn't need the lifetimes
of the two arguments be bound together.
2022-05-29 16:25:05 -07:00
Michael Goulet
8e01595d9b
Rollup merge of #97530 - GuillaumeGomez:more-eslint-checks, r=jsha
Add more eslint checks

Here is a new batch of eslint checks:

 * [no-const-assign](https://eslint.org/docs/rules/no-const-assign)
 * [no-debugger](https://eslint.org/docs/rules/no-debugger)
 * [no-dupe-args](https://eslint.org/docs/rules/no-dupe-args)
 * [no-duple-else-if](https://eslint.org/docs/rules/no-dupe-else-if)
 * [no-dupe-keys](https://eslint.org/docs/rules/no-dupe-keys)
 * [no-duplicate-case](https://eslint.org/docs/rules/no-duplicate-case)
 * [no-ex-assign](https://eslint.org/docs/rules/no-ex-assign)

r? ``@notriddle``
2022-05-29 16:25:04 -07:00
Michael Goulet
f68c532e6f
Rollup merge of #97518 - badboy:rustdoc-ul-div-fix, r=notriddle
Fix order of closing HTML elements in rustdoc output

Initially reported here: https://users.rust-lang.org/t/documentation-itself-parsed-error/76232
2022-05-29 16:25:03 -07:00
Michael Goulet
56026e2fc6
Rollup merge of #97493 - compiler-errors:issue-97490, r=oli-obk
Use `type_is_copy_modulo_regions` check in intrisicck

This one canoncalizes region variables correctly, preventing an ICE

Fixes #97490
2022-05-29 16:25:02 -07:00
est31
311aacf0d0 Remove unused lifetimes from expand_macro
The function doesn't need the lifetimes
of the two arguments be bound together.
2022-05-29 23:53:24 +02:00
Michael Goulet
46d34cc922 Use type_is_copy_modulo_regions check in intrisicck 2022-05-29 13:06:50 -07:00
Michael Goulet
2e25c2346b Note pattern mismatch coming from for-loop desugaring 2022-05-29 13:01:59 -07:00
Guillaume Gomez
f1a95b834c Add "no-ex-assign" eslint rule 2022-05-29 21:44:10 +02:00
Guillaume Gomez
d39703a6c5 Add "no-duplicate-case" eslint rule 2022-05-29 21:43:37 +02:00
bors
28b891916d Auto merge of #97514 - WaffleLapkin:panick, r=Dylan-DPC
Fix typo (panick -> panic)

Fix typo (panick -> panic) in `std::error` module docs.
2022-05-29 19:42:39 +00:00
Guillaume Gomez
88c3d707a6 Add "no-dupe-keys" eslint rule 2022-05-29 21:42:26 +02:00
Guillaume Gomez
397ad826b0 Add "no-dupe-else-if" eslint rule 2022-05-29 21:42:24 +02:00
Conrad Ludgate
5dd0fe301a remove useless cold 2022-05-29 20:40:56 +01:00
Conrad Ludgate
3f404bfa86 improve format impl for literals 2022-05-29 20:40:56 +01:00
Guillaume Gomez
9f79a03ca5 Add "no-dup-args" eslint rule 2022-05-29 21:40:16 +02:00