// that the components of this type are also `~const Destruct`. This // amounts to verifying that there are no values in this ADT that may have // a non-const drop. if cx.tcx.features().const_trait_impl() { let
// Trait methods are always accessible if the trait is in scope. ty::TraitContainer(_)=>{} // Trait methods are always all public. The only controlling factor // is whether the trait itself is accessible or not. ty::TraitContainer(trait_def_id)=>{ ...
if !tcx.has_attr(def_id, sym::rustc_mir) { debug!("skipping rustc_peek::SanityCheck on {}", tcx.def_path_str(def_id)); return; } else { debug!("running rustc_peek::SanityCheck on {}", tcx.def_path_str(def_id)); } pub fn sanity_check<'tcx>(tcx: TyCtxt<'tcx>, body...
In Rust, heap allocators are described by the [`GlobalAlloc`] trait, which is mentioned in the error message. To set the heap allocator for the crate, the `#[global_allocator]` attribute must be applied to a `static` variable that implements the `GlobalAlloc` trait. The first error ...
Initializing the array directly as `[None; BLOCK_SIZES.len()]` does not work because then the compiler requires that `Option<&'static mut ListNode>` implements the `Copy` trait, which it does not. This is a current limitation of the Rust compiler, which might go away in the future. ...
To be able to call `create_example_mapping` we need to create a type that implements the `FrameAllocator` trait first. As noted above, the trait is responsible for allocating frames for new page table if they are needed by `map_to`. To be able to call `create_example_mapping`, we ...
Revert "Remove unnecessary trait accessibility check."… cb0ce69 This reverts commitf4f95eb. rust-highfiveassignednrcOct 26, 2015 alexcrichtonmentioned this pull requestOct 26, 2015 nrcreviewedOct 26, 2015 View reviewed changes src/test/compile-fail/privacy-ufcs.rs ...
In Rust, heap allocators are described by the [`GlobalAlloc`] trait, which is mentioned in the error message. To set the heap allocator for the crate, the `#[global_allocator]` attribute must be applied to a `static` variable that implements the `GlobalAlloc` trait. 231 231 232 232 ...