Skip to content

Rollup of 11 pull requests #74322

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 60 commits into from
Closed
Changes from 2 commits
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
7527409
Constify most non-trait `Duration` methods as described in #72440
marmeladema May 21, 2020
37570e8
Substantial refactor to the design of LineWriter
Lucretiel May 29, 2020
0f38158
Updated comments; only pre-flush newline terminated buffers
Lucretiel May 31, 2020
4a1597f
Expressionify `LineWriterShim::write`
Lucretiel May 31, 2020
5edad37
Expressionify write_all
Lucretiel May 31, 2020
1bf8ba3
x.py fmt
Lucretiel May 31, 2020
e0dfdc6
Added check for `is_write_vectored`
Lucretiel Jun 1, 2020
2c3024b
Add comment describing erroneous_flush_retried
Lucretiel Jun 1, 2020
e89e2e4
Added test stubs
Lucretiel Jun 1, 2020
f0a0807
Various testing & implementation updates:
Lucretiel Jun 1, 2020
b6296e8
Tons of testing updates, other minor changes
Lucretiel Jun 2, 2020
e022d34
Fixed typo in test
Lucretiel Jun 2, 2020
e4328ae
Code review updates: all minor style fixes
Lucretiel Jun 2, 2020
f7650fe
Add comment
Lucretiel Jun 2, 2020
7a6a12b
Tidy fixes
Lucretiel Jun 2, 2020
338a2c0
Reimplement flush_buf with a Guard. Longer, but cleaner.
Lucretiel Jun 2, 2020
c869638
Added comment about BufWrite::write_all
Lucretiel Jun 2, 2020
61f591e
Improved line_vectored_ignored. Added stylistic semicolon.
Lucretiel Jun 2, 2020
2d22c77
Fixed bug in write_vectored & empty buffers
Lucretiel Jun 2, 2020
2c23b90
Comment updates
Lucretiel Jun 2, 2020
e999ca5
Remove inline from write_to_buf
Lucretiel Jun 2, 2020
70ba320
More minor changes
Lucretiel Jun 2, 2020
5b1a40c
BufWriter::write* methods now use fewer runtime checks
Lucretiel Jun 2, 2020
8df5ae0
x.py fix AGAIN
Lucretiel Jun 2, 2020
60ab99f
Fixed corner case related to partial-line buffering
Lucretiel Jun 2, 2020
38017a3
Update comments with relevant issue numbers
Lucretiel Jun 2, 2020
59710fb
Clarified comment in `partial_multiline_buffering` test
Lucretiel Jun 2, 2020
3e48aae
Clean up E0704 error explanation
GuillaumeGomez Jun 25, 2020
98a3b07
Add missing Stdin and StdinLock exampels
GuillaumeGomez Jun 26, 2020
9448ed4
Obviate #[allow(improper_ctypes_definitions)]
Goirad Jun 29, 2020
bddb266
typeck: check for infer before type impls trait
davidtwco Jul 2, 2020
23d7b3f
Remove an unwrap in layout computation
erikdesjardins Jul 10, 2020
b8632e1
Removed FIXME
Lucretiel Jul 11, 2020
140bfc5
Removed another FIXME
Lucretiel Jul 11, 2020
997accc
Remove doubled "is_write_vectored"
Lucretiel Jul 11, 2020
6a7b5df
Removed unused method
Lucretiel Jul 11, 2020
606593f
Minor updates
Lucretiel Jul 12, 2020
9a8b516
Sorting feature attributes in std
tesuji Jul 10, 2020
1e05e09
Remove the useless indentation
tesuji Jul 10, 2020
0ff820c
Move constants to top file
tesuji Jul 12, 2020
90a7d24
Make is_valid_drive_letter function
tesuji Jul 10, 2020
27a966a
Make use of slice::strip_prefix and slice pattern
tesuji Jul 10, 2020
b1d6798
Rewrite parse_two_comps
tesuji Jul 10, 2020
0281a05
Prefer empty OsStr over unsafe cast from [u8]
tesuji Jul 10, 2020
e31898b
Reduce unsafe scope
tesuji Jul 12, 2020
083c2f6
pprust: support multiline comments within lines
davidtwco Jul 12, 2020
5daedea
Detect tuple struct incorrectly used as struct pat
estebank Jul 9, 2020
0e89f50
Clean up handling of style files in rustdoc
Cldfire Jul 12, 2020
8c45cf8
Add Ayu theme to rustdoc
Cldfire Jul 12, 2020
d716d1c
Rollup merge of #71237 - Cldfire:rustdoc-ayu-theme, r=GuilliaumeGomez
Dylan-DPC Jul 14, 2020
246a47b
Rollup merge of #72481 - marmeladema:duration-consts-2, r=oli-obk
Dylan-DPC Jul 14, 2020
8fdcf94
Rollup merge of #72808 - Lucretiel:line-writer-reimpl, r=Amanieu
Dylan-DPC Jul 14, 2020
27b2897
Rollup merge of #73720 - GuillaumeGomez:cleanup-e0704, r=Dylan-DPC
Dylan-DPC Jul 14, 2020
92f6bf3
Rollup merge of #73759 - GuillaumeGomez:stdin-examples, r=Dylan-DPC
Dylan-DPC Jul 14, 2020
5acc42f
Rollup merge of #73866 - Goirad:fix-entry-improper-ctypes, r=davidtwco
Dylan-DPC Jul 14, 2020
af56daa
Rollup merge of #73965 - davidtwco:issue-73886-non-primitive-slice-ca…
Dylan-DPC Jul 14, 2020
88f072b
Rollup merge of #74173 - estebank:struct-pat-as-enum, r=petrochenkov
Dylan-DPC Jul 14, 2020
7adb86d
Rollup merge of #74220 - lzutao:windows-path-com, r=LukasKalbertodt
Dylan-DPC Jul 14, 2020
38fc369
Rollup merge of #74227 - erikdesjardins:layun, r=estebank
Dylan-DPC Jul 14, 2020
317c840
Rollup merge of #74272 - davidtwco:issue-73626-multiline-mixed-commen…
Dylan-DPC Jul 14, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/librustc_typeck/check/cast.rs
Original file line number Diff line number Diff line change
@@ -387,6 +387,7 @@ impl<'a, 'tcx> CastCheck<'tcx> {
// Check for infer types because cases like `Option<{integer}>` would
// panic otherwise.
if !expr_ty.has_infer_types()
&& !ty.has_infer_types()
&& fcx.tcx.type_implements_trait((
from_trait,
ty,
6 changes: 6 additions & 0 deletions src/test/ui/issues/issue-73886.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
fn main() {
let _ = &&[0] as &[_];
//~^ ERROR non-primitive cast: `&&[i32; 1]` as `&[_]`
let _ = 7u32 as Option<_>;
//~^ ERROR non-primitive cast: `u32` as `std::option::Option<_>`
}
15 changes: 15 additions & 0 deletions src/test/ui/issues/issue-73886.stderr
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
error[E0605]: non-primitive cast: `&&[i32; 1]` as `&[_]`
--> $DIR/issue-73886.rs:2:13
|
LL | let _ = &&[0] as &[_];
| ^^^^^^^^^^^^^ an `as` expression can only be used to convert between primitive types or to coerce to a specific trait object

error[E0605]: non-primitive cast: `u32` as `std::option::Option<_>`
--> $DIR/issue-73886.rs:4:13
|
LL | let _ = 7u32 as Option<_>;
| ^^^^^^^^^^^^^^^^^ an `as` expression can only be used to convert between primitive types or to coerce to a specific trait object

error: aborting due to 2 previous errors

For more information about this error, try `rustc --explain E0605`.