Skip to content
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

Rollup of 6 pull requests #69012

Merged
merged 20 commits into from
Feb 10, 2020
Merged
Changes from 1 commit
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
0b20ce9
Make `num::NonZeroX::new` an unstable `const fn`
ecstatic-morse Feb 9, 2020
0755c41
Test `NonZeroU8::new` in a const context
ecstatic-morse Feb 9, 2020
fa5a3c3
Don't parse `mut a @ b` as `mut a @ mut b`
matthewjasper Feb 9, 2020
effd520
Print `after` effect in default graphviz formatter
ecstatic-morse Jan 21, 2020
852afa2
Add option to `dot::render` for monospace font
ecstatic-morse Jan 21, 2020
fb14386
Remove unnecessary allows
ecstatic-morse Jan 21, 2020
83dfb42
Don't break first line
ecstatic-morse Jan 21, 2020
8d6208c
Use nicer alignment when printing state vectors
ecstatic-morse Jan 21, 2020
cd7a428
parser: Keep current and previous tokens precisely
petrochenkov Feb 9, 2020
7426853
Reduce the number of `RefCell`s in `InferCtxt`.
nnethercote Jan 30, 2020
5ab1ab4
Reduce queries/map lookups done by coherence
jonas-schievink Feb 7, 2020
82d6e79
Add desc to `specialization_graph_of` query
jonas-schievink Feb 7, 2020
8f468ee
Defer error span calculation until needed
jonas-schievink Feb 7, 2020
2309592
Remove vestigial #43355-compat code
jonas-schievink Feb 8, 2020
8007f84
Rollup merge of #68694 - nnethercote:reduce-RefCells-in-InferCtxt, r=…
Dylan-DPC Feb 10, 2020
b3cfb97
Rollup merge of #68966 - jonas-schievink:coherence-perf, r=varkor
Dylan-DPC Feb 10, 2020
e3315f6
Rollup merge of #68976 - ecstatic-morse:const-non-zero, r=dtolnay
Dylan-DPC Feb 10, 2020
64d2d04
Rollup merge of #68992 - matthewjasper:imm-binding-after-at, r=Centril
Dylan-DPC Feb 10, 2020
a8d4ccf
Rollup merge of #69005 - ecstatic-morse:unified-dataflow-graphviz, r=…
Dylan-DPC Feb 10, 2020
18c6d39
Rollup merge of #69006 - petrochenkov:prevspan2, r=Centril
Dylan-DPC Feb 10, 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
3 changes: 2 additions & 1 deletion src/libcore/num/mod.rs
Original file line number Diff line number Diff line change
@@ -69,8 +69,9 @@ assert_eq!(size_of::<Option<core::num::", stringify!($Ty), ">>(), size_of::<", s

/// Creates a non-zero if the given value is not zero.
#[$stability]
#[rustc_const_unstable(feature = "const_nonzero_int_methods", issue = "53718")]
#[inline]
pub fn new(n: $Int) -> Option<Self> {
pub const fn new(n: $Int) -> Option<Self> {
if n != 0 {
// SAFETY: we just checked that there's no `0`
Some(unsafe { Self(n) })