Skip to content

Instantly share code, notes, and snippets.

@nagisa
nagisa / Cargo.toml
Last active February 11, 2020 17:31
[workspace]
members = [
"brand_new",
"old_rusty",
]
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
# seqcst store/load:
data memory barrier
store/load
data memory barrier
# acquire load:
data memory barrier
  • Feature Name: type_name
  • Start Date: 2018-04-21
  • RFC PR: (leave this empty)
  • Rust Issue: (leave this empty)

Summary

Make the output of type_name structured and convenient and put the intrinsic on the path to sabilisation.

diff --git a/src/libcore/iter.rs b/src/libcore/iter.rs
index afd399b..1665723 100644
--- a/src/libcore/iter.rs
+++ b/src/libcore/iter.rs
@@ -1266,13 +1266,13 @@ pub trait Iterator {
let mut other = other.into_iter();
loop {
- match (self.next(), other.next()) {
- (None, None) => return Ordering::Equal,
trait Monoid<T> {
let zero : T;
// Arbitrary 2 argument functions may be used as binary operators
let `+` : T → T → T;
}
#![feature(placement_in_syntax, test)]
#![feature(placement_new_protocol)]
use std::ops::{Placer, Place, InPlace};
#[cfg(test)] extern crate test;
#[cfg(test)] use test::Bencher;
pub struct MyVec<T>(Vec<T>);
pub struct MyVecEmplace<'a, T: 'a>(*mut T, &'a mut MyVec<T>);
#![feature(unicode, core_intrinsics)]
struct MyString(String);
impl From<Vec<char>> for MyString {
fn from(mut chars: Vec<char>) -> MyString {
let mut bytes_used = 0usize;
let length = chars.len();
for index in 0..length {
let current_char = unsafe { *chars.get_unchecked(index) };
let output_buf: &mut [u8] = unsafe {
enum B {}
impl B {
fn bb() -> i32 { 0 }
}
fn main() {
match 0 {
B::bb => {}
}
src/net.rs:99:34: 99:53 error: type `&net::Host` does not implement any method in scope named `update_tables`
src/net.rs:99 self.update_tables(c, p);
^~~~~~~~~~~~~~~~~~~
src/net.rs:99:34: 99:53 note: found defined static methods, maybe a `self` is missing?
src/net.rs:157:5: 159:6 note: candidate #1 is defined in an impl for the type `net::Host`
src/net.rs:157 fn update_tables(source: IP, packet: &RIPv1Packet) {
src/net.rs:158
src/net.rs:159 }