- 29 1月, 2022 2 次提交
-
-
由 bors 提交于
Rollup of 10 pull requests Successful merges: - #92611 (Add links to the reference and rust by example for asm! docs and lints) - #93158 (wasi: implement `sock_accept` and enable networking) - #93239 (Add os::unix::net::SocketAddr::from_path) - #93261 (Some unwinding related cg_ssa cleanups) - #93295 (Avoid double panics when using `TempDir` in tests) - #93353 (Unimpl {Add,Sub,Mul,Div,Rem,BitXor,BitOr,BitAnd}<$t> for Saturating<$t>) - #93356 (Edit docs introduction for `std::cmp::PartialOrd`) - #93375 (fix typo `documenation`) - #93399 (rustbuild: Fix compiletest warning when building outside of root.) - #93404 (Fix a typo from #92899) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
-
由 bors 提交于
backport llvm fix for issue 91671. fix #91671
-
- 28 1月, 2022 35 次提交
-
-
由 Felix S. Klock II 提交于
-
由 Matthias Krüger 提交于
Fix a typo from #92899 Just happened to notice this in passing
-
由 Matthias Krüger 提交于
rustbuild: Fix compiletest warning when building outside of root. This fixes a warning that would happen when passing arguments to compiletest (like `x.py test src/test/ui`) when running `x.py` outside of the root source directory. For example, the CI builders do this, which causes a confusing warning message. This also fixes it so that passing a full path works (like `x.py test src/test/ui/hello.rs`) in the same scenario (previously it would just ignore the `hello.rs` part).
-
由 Matthias Krüger 提交于
fix typo `documenation`
-
由 Matthias Krüger 提交于
Edit docs introduction for `std::cmp::PartialOrd` This makes `PartialOrd` consistent with the other three traits in this module, which all include links to their corresponding mathematical concepts on Wikipedia. <img width="500" alt="Screen Shot 2022-01-26 at 10 24 23 PM" src="https://user-images.githubusercontent.com/19642016/151291720-decd85ed-cd6e-4be0-84a9-619b98ceb386.png">
-
由 Matthias Krüger 提交于
Unimpl {Add,Sub,Mul,Div,Rem,BitXor,BitOr,BitAnd}<$t> for Saturating<$t> Tracking issue #92354 Analog to 9648b313 #93208 reduce `saturating_int_assign_impl` (#93208) to: ```rust let mut value = Saturating(2u8); value += 3u8; value -= 1u8; value *= 2u8; value /= 2u8; value %= 2u8; value ^= 255u8; value |= 123u8; value &= 2u8; ``` See https://github.com/rust-lang/rust/pull/93208#issuecomment-1022564429
-
由 Matthias Krüger 提交于
Avoid double panics when using `TempDir` in tests `TempDir` could panic on drop if `remove_dir_all` returns an error. If this happens while already panicking, the test process would abort and therefore not show the test results. This PR tries to avoid such double panics.
-
由 Matthias Krüger 提交于
Some unwinding related cg_ssa cleanups These should make it a bit easier for alternative codegen backends to implement unwinding.
-
由 Matthias Krüger 提交于
Add os::unix::net::SocketAddr::from_path Creates a new SocketAddr from a path, supports both regular paths and abstract namespaces. Note that `SocketAddr::from_abstract_namespace` could be removed after this as `SocketAddr::unix` also supports abstract namespaces. Updates #65275 Unblocks https://github.com/tokio-rs/mio/issues/1527 r? `@m-ou-se`
-
由 Matthias Krüger 提交于
wasi: implement `sock_accept` and enable networking With the addition of `sock_accept()` to snapshot1, simple networking via a passed `TcpListener` is possible. This PR implements the basics to make a simple server work. See also: * [wasmtime tracking issue](https://github.com/bytecodealliance/wasmtime/issues/3730) * [wasmtime PR](https://github.com/bytecodealliance/wasmtime/pull/3711) TODO: * [ ] Discussion of `SocketAddr` return value for `::accept()` ```rust Ok(( TcpStream::from_inner(unsafe { Socket::from_raw_fd(fd as _) }), // WASI has no concept of SocketAddr yet // return an unspecified IPv4Addr SocketAddr::new(Ipv4Addr::UNSPECIFIED.into(), 0), )) ```
-
由 Matthias Krüger 提交于
Add links to the reference and rust by example for asm! docs and lints These were previously removed in #91728 due to broken links. cc ``@ehuss`` since this updates the rust-by-example submodule
-
由 Thomas de Zeeuw 提交于
-
由 bors 提交于
Fix debuginfo for pointers/references to unsized types This PR makes the compiler emit fat pointer debuginfo in all cases. Before, we sometimes got thin-pointer debuginfo, making it impossible to fully interpret the pointed to memory in debuggers. The code is actually cleaner now, especially around generation of trait object pointer debuginfo. Fixes https://github.com/rust-lang/rust/issues/92718 ~~Blocked on https://github.com/rust-lang/rust/pull/92729.~~
-
由 Harald Hoyer 提交于
With the addition of `sock_accept()` to snapshot1, simple networking via a passed `TcpListener` is possible. This patch implements the basics to make a simple server work. Signed-off-by: NHarald Hoyer <harald@profian.com>
-
由 Harald Hoyer 提交于
To make use of `sock_accept()`, update the wasi crate to `0.11.0`. Signed-off-by: NHarald Hoyer <harald@profian.com>
-
由 bors 提交于
Suggest tuple-parentheses for enum variants This follows on from #86493 / #86481, making the parentheses suggestion. To summarise, given the following code: ```rust fn f() -> Option<(i32, i8)> { Some(1, 2) } ``` The current output is: ``` error[E0061]: this enum variant takes 1 argument but 2 arguments were supplied --> b.rs:2:5 | 2 | Some(1, 2) | ^^^^ - - supplied 2 arguments | | | expected 1 argument error: aborting due to previous error For more information about this error, try `rustc --explain E0061`. ``` With this change, `rustc` will now suggest parentheses when: - The callee is expecting a single tuple argument - The number of arguments passed matches the element count in the above tuple - The arguments' types match the tuple's fields ``` error[E0061]: this enum variant takes 1 argument but 2 arguments were supplied --> b.rs:2:5 | 2 | Some(1, 2) | ^^^^ - - supplied 2 arguments | help: use parentheses to construct a tuple | 2 | Some((1, 2)) | + + ```
-
由 Michael Woerister 提交于
[debuginfo] Fix and unify handling of fat pointers in debuginfo: Don't mark fat pointer fields as artificial. LLDB does not seem to see fields if they are marked with DW_AT_artificial which breaks pretty printers that use these fields for decoding fat pointers.
-
由 pierwill 提交于
This makes `PartialOrd` consistent with the other three traits in this module, which all include links to their respective mathematical concepts on Wikipedia.
-
由 bors 提交于
Only traverse attrs once while checking for coherence override attributes In coherence, while checking for negative impls override attributes: only traverse the `DefId`s' attributes once. This PR is an easy way to get back some of the small perf loss in #93175
-
由 Kvicii 提交于
-
由 scottmcm 提交于
Just happened to notice this in passing
-
由 bors 提交于
Update Clippy r? `@Manishearth`
-
由 Eric Huss 提交于
-
由 bors 提交于
Rollup of 8 pull requests Successful merges: - #91641 (Define c_char using cfg_if rather than repeating 40-line cfg) - #92899 (Mention std::iter::zip in Iterator::zip docs) - #93193 (Add test for stable hash uniqueness of adjacent field values) - #93325 (Introduce a limit to Levenshtein distance computation) - #93339 (rustdoc: add test case for multiple traits and erased names) - #93357 (Clarify the `usage-of-qualified-ty` error message.) - #93363 (`#[rustc_pass_by_value]` cleanup) - #93365 (More arena cleanups) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
-
由 Matthias Krüger 提交于
More arena cleanups A sequel to #90990. r? `@oli-obk`
-
由 Matthias Krüger 提交于
`#[rustc_pass_by_value]` cleanup
-
由 Matthias Krüger 提交于
Clarify the `usage-of-qualified-ty` error message. I found this message confusing when I encountered it. This commit makes it clearer that you have to import the unqualified type yourself. r? `@lcnr`
-
由 Matthias Krüger 提交于
rustdoc: add test case for multiple traits and erased names https://github.com/rust-lang/rust/pull/92339#discussion_r792805289
-
由 Matthias Krüger 提交于
Introduce a limit to Levenshtein distance computation Incorporate distance limit from `find_best_match_for_name` directly into Levenshtein distance computation. Use the string size difference as a lower bound on the distance and exit early when it exceeds the specified limit. After finding a candidate within a limit, lower the limit further to restrict the search space.
-
由 Matthias Krüger 提交于
Add test for stable hash uniqueness of adjacent field values This PR adds a simple test to check that stable hash will produce a different hash if the order of two values that have the same combined bit pattern changes. r? `@the8472`
-
由 Matthias Krüger 提交于
Mention std::iter::zip in Iterator::zip docs Closes https://github.com/rust-lang/rust/issues/91960 I'm not sure about the wording. I think it's alright, but happy to change.
-
由 Matthias Krüger 提交于
Define c_char using cfg_if rather than repeating 40-line cfg Libstd has a 40-line cfg that defines the targets on which `c_char` is unsigned, and then repeats the same cfg with `not(…)` for the targets on which `c_char` is signed. This PR replaces it with a `cfg_if!` in which an `else` takes care of the signed case. I confirmed that `x.py doc library/std` inlines the type alias because c_char_definition is not a publicly accessible path: ![Screenshot from 2021-12-07 13-42-07](https://user-images.githubusercontent.com/1940490/145110596-f1058406-9f32-44ff-9a81-1dfd19b4a24f.png)
-
由 David Tolnay 提交于
-
由 Nicholas Nethercote 提交于
It's simply a binary thing to allow different behaviour for `Copy` vs `!Copy` types. The new code makes this much clearer; I was scratching my head over the old code for some time.
-
由 Nicholas Nethercote 提交于
-
- 27 1月, 2022 3 次提交
-
-
由 Michael Woerister 提交于
[debuginfo] Fix and unify handling of fat pointers in debuginfo: Change doc comment so it is not interpreted as doc-test.
-
由 flip1995 提交于
-
由 Kvicii 提交于
-