This is a simple addition, shouldn't change behavior.
Fixes#26704
I don't know if the coercion for `Rc` is tested, if it is this probably needs the same test with `Weak`.
This doesn't add a test for the main problem in #8640 since it seems that
was already fixed (including a test) in PR https://github.com/rust-lang/rust/pull/19522. This just adds a test
for a program mentioned in the comments that used to erroneously compile.
Closes#8640.
This patch implements the next chunk of flattening out the type checking context. In a series of patches I moved around the necessary state and logic in order to delete the `Typer` and `ClosureTyper` traits. My next goal is to clean the interfaces and start to move the normalization code behind them.
r? @nrc I hope my PR is coherent, doing this too late at night ;)
This was added after Windows 7 SP1, so it's not always available. Instead use
the `SetHandleInformation` function to flag a socket as not inheritable. This is
not atomic with respect to creating new processes, but it mirrors what Unix does
with respect to possibly using the atomic option in the future.
Closes#26543
This doesn't add a test for the main problem in #8640 since it seems that
was already fixed (including a test) in PR #19522. This just adds a test
for a program mentioned in the comments that used to erroneously compile.
Closes#8640.
Like explained in #26016, typing `?` had no effect with non-english keyboard layouts in the docs.
This patch seems to resolve this issue, **tested with AZERTY keyboard in Google Chrome and Firefox**. I haven't tested it with more exotic keyboard layouts or with other browsers though.
This code is based on the information found on: http://javascript.info/tutorial/keyboard-events
**More specifically:**
> The only event which reliably provides the character is keypress.
**And**
>```
// event.type must be keypress
function getChar(event) {
if (event.which == null) {
return String.fromCharCode(event.keyCode) // IE
} else if (event.which!=0 && event.charCode!=0) {
return String.fromCharCode(event.which) // the rest
} else {
return null // special key
}
}
```
`?` and `S` work, `escape` however does not (on an Azerty keyboard).
It would be good if some people could test it with other browsers and keyboard layouts: http://www.mathieudavid.org/test/rustdoc/std/index.html
**Edit:**
- swedish layout works on Firefox and Chromium
- french (azerty) mac layout works on Safari
This was added after Windows 7 SP1, so it's not always available. Instead use
the `SetHandleInformation` function to flag a socket as not inheritable. This is
not atomic with respect to creating new processes, but it mirrors what Unix does
with respect to possibly using the atomic option in the future.
Closes#26543
Fixes#26646.
Loops over all `#[repr(..)]` attributes instead of stopping at the first one to make sure they are all marked as used. Previously it stopped after the first `#[repr(C)]` was found causing all other attributes to be skipped by the linter.
fmt: Update docs and mention :#? pretty-printing
Expose `:#?` well in the docs for fmt and Debug itself. Also update some out of date information and fix formatting in `std::fmt` docs.