Skip to content

Instantly share code, notes, and snippets.

Test Clean BaseIncr CleanIncr PatchedIncr0
style-servo-Check 27 27 8 N/A
tuple-stress-Opt 14 13 0 N/A
keccak-Debug 47 47 3 N/A
webrender-Opt 0 0 1 N/A
syn-Debug 4 2 0 N/A
unify-linearly-Check 6 0 3 N/A
webrender-Check 26 27 8 N/A
regression-31157-Opt 0 0 0 N/A
ctfe-stress-Debug 0 0 0 N/A
Test Clean BaseIncr CleanIncr PatchedIncr0
ucd-Check 3 3 0 0
regex-Check 2 0 0 0
cargo-Debug 0 0 0 0
clap-rs-Check 3 1 0 0
deeply-nested-Opt 0 0 0 0
ctfe-stress-Check 0 0 0 0
packed-simd-Check 2 2 0 0
deep-vector-Check 6 3 0 0
helloworld-Opt 0 0 0 0
ucd-Check 3 3 0 0
regex-Check 2 0 0 0
cargo-Debug 0 0 0 0
clap-rs-Check 3 1 0 0
deeply-nested-Opt 0 0 0 0
ctfe-stress-Check 0 0 0 0
packed-simd-Check 2 2 0 0
deep-vector-Check 6 3 0 0
helloworld-Opt 0 0 0 0
"Test", "Clean", "BaseIncr", "CleanIncr", "PatchedIncr0",
cargo-Check, 4, 2, 0, 0,
cargo-Debug, 1, 0, 0, 0,
cargo-Opt, 0, 0, 0, 0,
clap-rs-Check, 5, 2, 0, 0,
clap-rs-Debug, 1, 0, 0, 0,
clap-rs-Opt, 0, 0, 0, 0,
coercions-Check, 2, 2, 0, 0,
coercions-Debug, 1, 0, 0, 0,
coercions-Opt, 1, 0, 0, 0,
diff --git a/unsafe-analysis/src/implicit_unsafe/rta.rs b/unsafe-analysis/src/implicit_unsafe/rta.rs
index e62810547..cb534f430 100644
--- a/unsafe-analysis/src/implicit_unsafe/rta.rs
+++ b/unsafe-analysis/src/implicit_unsafe/rta.rs
@@ -573,28 +573,20 @@ impl<'a, 'b, 'tcx:'a+'b> Visitor<'tcx> for CallsVisitor<'a,'b,'tcx> {
let mut not_safe = false;
let mut unresolved_type = false;
let mut cco = None;
- match func {
- Operand::Constant(constant) => {

Things to test (all tests are found in src/test/ui/traits/trait-alias unless otherwise noted):

  • impl TraitAlias for u32 { .. } -- trait-alias-impl.rs
  • Kinds of trait aliases:
    • trait SendSyncAlias = Send + Sync
    • trait WhereSendAlias = where Self: Send
    • trait SendEqAlias<T> = Send where T: PartialEq<Self>
    • with associated items specified (trait U32Iterator = Iterator<Item = u32>)
    • with a lifetime parameter (trait PartialEqRef<'a, T> = PartialEq<&'a T> or something like that)
  • Test (ideally) each kind of where clause in each possible position:
warning: field is never used: `private`
--> /home/nmatsakis/tmp/foo.rs:6:5
|
6 | private: std::num::NonZeroU32,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: #[warn(dead_code)] on by default
warning: function is never used: `main`
--> /home/nmatsakis/tmp/foo.rs:36:1
use std::cell::RefCell;
use std::collections::HashMap;
use std::rc::Rc;
use typed_arena::Arena;
struct Memory {
root_alloc: Allocation,
table: RefCell<HashMap<u32, Rc<Allocation>>>,
}
use std::marker::PhantomData;
use std::cmp::Ordering;
use std::ops::{Add, Mul};
pub type True = B1;
pub type False = B0;
pub type U0 = UTerm;
pub type U1 = UInt<UTerm, B1>;
pub trait NonZero {}
// MIR for `Z`
// source = MirSource { def_id: DefId(0/0:4 ~ issue_54224[317d]::Z[0]), promoted: None }
// pass_name = nll
// disambiguator = 0
| Free Region Mapping
| '_#0r | Global | ['_#0r, '_#1r]
| '_#1r | Local | ['_#1r]
|
| Inferred Region Values