mejrs
519b1abd19
Translate const_to_pat.rs
2023-01-11 14:39:27 -08:00
asquared31415
337a97d374
add checks for the signature of the lang item
2023-01-11 14:35:08 -08:00
mejrs
7aff210ead
Support eager subdiagnostics again
2023-01-11 14:20:34 -08:00
Daniel Henry-Mantilla
48b7e2a5b9
Stabilize ::{core,std}::pin::pin!
2023-01-11 14:09:14 -08:00
Oli Scherer
44a5ce6f75
Test that we cannot use trait impl methods arguments as defining uses
2023-01-11 14:00:25 -08:00
Esteban Küber
f1ffe823cf
Hide more of long types in E0271
...
Fix #40186 .
2023-01-11 21:40:39 +00:00
Esteban Küber
8b8cce16bf
Use the root trait predicate to determine whether to remove references
...
Fix #84837 .
2023-01-11 21:39:07 +00:00
Esteban Küber
bb7211702e
fix rebase
2023-01-11 21:38:56 +00:00
Esteban Küber
ce83be4af8
Account for type params
2023-01-11 21:38:56 +00:00
Esteban Küber
2024aa48b4
Make &
-removal suggestion verbose
2023-01-11 21:38:54 +00:00
Esteban Küber
41e66d9025
review comments: Tweak output
...
* Account for `struct S(pub(super)Ty);` in suggestion
* Suggest changing field visibility in E0603 too
2023-01-11 21:36:02 +00:00
Esteban Küber
eb835093a3
review comment
2023-01-11 21:35:42 +00:00
Esteban Küber
ad13d9fbbe
Suggest making private tuple struct field public
...
Fix #52144 .
2023-01-11 21:35:42 +00:00
Esteban Küber
c6f322bf30
review comments: account for generics
2023-01-11 21:30:32 +00:00
Esteban Küber
147c9bf4d5
review comments
2023-01-11 21:30:10 +00:00
Esteban Küber
12ddf77811
When suggesting writing a fully qualified path probe for appropriate types
...
Fix #46585 .
2023-01-11 21:30:10 +00:00
Michael Goulet
c8334ce60c
Move autoderef to rustc_hir_analysis
2023-01-11 20:12:57 +00:00
Matthias Krüger
106df9ec98
Rollup merge of #106734 - albertlarsan68:deny-src-tests-in-tidy, r=Nilstrieb
...
Deny having src/test exisiting in tidy
Fixes #106724
2023-01-11 21:08:10 +01:00
Matthias Krüger
dce5e29edc
Rollup merge of #106726 - cmorin6:fix-comment-typos, r=Nilstrieb
...
Fix some typos in code comments.
2023-01-11 21:08:09 +01:00
Matthias Krüger
865d83e87a
Rollup merge of #106705 - compiler-errors:new-solver-err-properly, r=lcnr
...
Report fulfillment errors in new trait solver
Causes fewer ICEs when testing the new solver 😄
2023-01-11 21:08:09 +01:00
Matthias Krüger
90f9c681d4
Rollup merge of #106703 - compiler-errors:impl-derived-span, r=estebank
...
Note predicate span on `ImplDerivedObligation`
Seems obvious to point out the where-clause that introduces the `ImplDerivedObligation` :)
r? `@estebank`
2023-01-11 21:08:08 +01:00
Matthias Krüger
88765b0f59
Rollup merge of #106622 - estebank:issue-68972, r=davidtwco
...
Detect out of bounds range pattern value
Fix #68972 .
2023-01-11 21:08:07 +01:00
Matthias Krüger
7ee3fd2edc
Rollup merge of #106620 - estebank:issue-82051, r=davidtwco
...
Detect struct literal needing parentheses
Fix #82051 .
2023-01-11 21:08:07 +01:00
Michael Goulet
83fbc71d02
Filter impl and where-clause candidates that reference errors
2023-01-11 20:03:29 +00:00
Michael Goulet
4e30ad8d60
Reuse ErrorGuaranteed during relation
2023-01-11 20:02:43 +00:00
Michael Goulet
959616ef44
Handle inference variables in CollectAllMismatches correctly
2023-01-11 20:01:24 +00:00
bors
1e4f90061c
Auto merge of #106660 - saethlin:destprop-move-codegen, r=tmiasko
...
Add a regression test for argument copies with DestinationPropagation
This example, as a codegen test: https://github.com/rust-lang/rust/pull/105813#issuecomment-1367947793
r? `@tmiasko`
2023-01-11 19:56:44 +00:00
Michael Goulet
d375440dab
label where constructor is defined and note that it should be called
2023-01-11 19:53:15 +00:00
Michael Goulet
ede5c31af4
Be more specific about constructor FnDef
s in type mismatch
2023-01-11 19:53:14 +00:00
Michael Goulet
70a8d8dcf3
Allow codegen to unsize dyn* to dyn
2023-01-11 19:52:42 +00:00
Michael Goulet
9a39d7e441
Note predicate span on ImplDerivedObligation
2023-01-11 19:46:45 +00:00
Esteban Küber
317adda649
Tweak output
2023-01-11 19:31:34 +00:00
Esteban Küber
fb5d215347
Conserve cause of ImplDerivedObligation
in E0599
...
CC #86377 .
2023-01-11 19:31:33 +00:00
DebugSteven
0d834d9523
keep --wrapper-version argument in x
2023-01-11 12:13:35 -07:00
Maybe Waffle
d642781708
Make selfless dyn AstConv
methods into toplevel functions
2023-01-11 19:07:03 +00:00
Maybe Waffle
89f1555824
Add AstConv::astconv
method to remove <dyn AstConv>::
calls
2023-01-11 18:58:44 +00:00
Albert Larsan
ebd33522d7
Deny having src/test exisiting in tidy
2023-01-11 18:25:33 +00:00
J Haigh
1a993611d2
Revert "warn newer available version of the x tool"
2023-01-11 11:11:56 -07:00
Michael Goulet
104ec48c64
Report fulfillment errors in new trait solver
2023-01-11 18:05:50 +00:00
Alex Macleod
34024adc88
expl_impl_clone_on_copy: ignore packed structs with type/const params
2023-01-11 17:37:19 +00:00
Mateusz Guzik
b49aa8d53e
Stop probing for statx unless necessary
...
As is the current toy program:
fn main() -> std::io::Result<()> {
use std::fs;
let metadata = fs::metadata("foo.txt")?;
assert!(!metadata.is_dir());
Ok(())
}
... observed under strace will issue:
[snip]
statx(0, NULL, AT_STATX_SYNC_AS_STAT, STATX_ALL, NULL) = -1 EFAULT (Bad address)
statx(AT_FDCWD, "foo.txt", AT_STATX_SYNC_AS_STAT, STATX_ALL, {stx_mask=STATX_ALL|STATX_MNT_ID, stx_attributes=0, stx_mode=S_IFREG|0644, stx_size=0, ...}) = 0
While statx is not necessarily always present, checking for it can be
delayed to the first error condition. Said condition may very well never
happen, in which case the check got avoided altogether.
Note this is still suboptimal as there still will be programs issuing
it, but bulk of the problem is removed.
Tested by forbidding the syscall for the binary and observing it
correctly falls back to newfstatat.
While here tidy up the commentary, in particular by denoting some
problems with the current approach.
2023-01-11 17:10:08 +00:00
Mateusz Guzik
753e576722
Fix up stat test in libc-fs-with-isolation
...
The test relied on Error::last_os_error() coming from the stat call on
the passed file, but there is no guarantee this will be the case.
Instead extract errno from the error returned by the routine.
Patch de facto written by joboet.
Co-authored-by: joboet <jonasboettiger@icloud.com>
2023-01-11 17:09:12 +00:00
bors
ef4046e4f3
Auto merge of #106730 - Nilstrieb:rollup-f7p8dsa, r=Nilstrieb
...
Rollup of 9 pull requests
Successful merges:
- #106321 (Collect and emit proper backtraces for `delay_span_bug`s)
- #106397 (Check `impl`'s `where` clauses in `consider_impl_candidate` in experimental solver)
- #106427 (Improve fluent error messages)
- #106570 (add tests for div_duration_* functions)
- #106648 (Polymorphization cleanup)
- #106664 (Remove unnecessary lseek syscall when using std::fs::read)
- #106709 (Disable "split dwarf inlining" by default.)
- #106715 (Autolabel and ping wg for changes to new solver)
- #106717 (fix typo LocalItemId -> ItemLocalId)
Failed merges:
r? `@ghost`
`@rustbot` modify labels: rollup
2023-01-11 17:01:44 +00:00
León Orell Valerian Liehr
70ddde76df
parser: recover from where clauses placed before tuple struct bodies
2023-01-11 17:54:48 +01:00
Esteban Küber
5311938531
Detect struct literal needing parentheses
...
Fix #82051 .
2023-01-11 16:53:21 +00:00
Esteban Küber
52d534ef63
Detect out of bounds range pattern value
...
Fix #68972 .
2023-01-11 16:50:55 +00:00
nils
9aeef61820
Rollup merge of #106717 - klensy:typo, r=lcnr
...
fix typo LocalItemId -> ItemLocalId
2023-01-11 17:30:58 +01:00
nils
80c535f15c
Rollup merge of #106715 - BoxyUwU:new_solver_triagebot, r=lcnr
...
Autolabel and ping wg for changes to new solver
r? ```@lcnr```
2023-01-11 17:30:57 +01:00
nils
082ff0f08d
Rollup merge of #106709 - khuey:disable_split_dwarf_inlining_by_default, r=davidtwco
...
Disable "split dwarf inlining" by default.
This matches clang's behavior and makes split-debuginfo behave as expected (i.e. actually split the debug info).
Fixes #106592
2023-01-11 17:30:56 +01:00
nils
9a820f7397
Rollup merge of #106664 - chenyukang:yukang/fix-106597-remove-lseek, r=cuviper
...
Remove unnecessary lseek syscall when using std::fs::read
Fixes #106597
r? ```@bjorn3```
2023-01-11 17:30:56 +01:00