rust: Update builtins
and sample file
#1922
Labels
bugfix-request
A request for a bugfix to be developed.
builtins
and sample file
#1922
Lexer
rust
Versions
Problems
Rouge::Lexers::Rust#builtins()
struct
s/trait
s.spec/visual/samples/rust
Proposals
The built-in items
Things that should be removed
Cons
Const
Either
Failure
Gc
Left
Modulo
Nil
Num
Ptr
Right
Success
These
struct
s ortrait
s are not defined in newer versions of Rust, at least v1.66.Things that should be added
Based on
std::prelude
: https://doc.rust-lang.org/std/prelude/index.htmlFromIterator
ToOwned
ToString
TryFrom
TryInto
You can use any items in
std::prelude
module without importing.The sample file
The sample file may be written in pre-1.0 Rust.
io::println
=>println!
impl<A> &[A]: iterable<A> { ... }
=>impl<A> iterable<A> for &[A] { ... }
for vec::each(self) |e| { ... }
=>for e in v.iter() { ... }
assert some_expr
=>assert!(some_expr)
5...6
=>5..=6
tag(~str, ~[HTMLFragment])
=>Tag(String, Vec<Box<HTMLFragment>>)
EDIT:
fn<'a> pointer(&'a u32) {}
=>fn pointer<'a>(n: &'a u32) {}
int
=>i32
uint
=>usize
The text was updated successfully, but these errors were encountered: