Questions tagged [rust-obsolete]

Versions of Rust predating 1.0 can have drastically different syntax and semantics. Some questions for these versions no longer apply to a stable version of Rust but are of historical interest.

The Rust programming language evolved drastically before the first stable release. Code written for Rust 0.6 can have very different syntax from code written for Rust 1.0, and sometimes entire concepts or features of the language were added or removed.

This tag is for questions that are not applicable for any stable version of Rust (e.g. 1.0.0 and up).

50 questions
1
vote
2 answers

Cargo.toml for lib

I want to create a library for rust. This is the Cargo.toml file for my project : [package] name = "binary_tree" version = "0.0.1" authors = ["Guillaume Bersac "] [lib] test = true plugin = false This is the file of my…
Moebius
  • 6,242
  • 7
  • 42
  • 54
1
vote
2 answers

How do I state that I want a struct which contains a reference to something which implements a trait?

Editor's note: The code presented in the question compiles as-is in Rust 1.0. I've tried: trait Inner {} struct Outer<'a> { inner: &'a Inner, } but the compiler complains: Compiling tst v0.1.0…
fadedbee
  • 42,671
  • 44
  • 178
  • 308
1
vote
1 answer

How do I make my struct fields mutable when accessing through a shared box ptr?

Editor's note: This code is from a version of Rust prior to 1.0 and is not syntactically or semantically valid Rust 1.0 code. So, scoping out shared box pointers as a learning exercise. Purely academic exercise. #[feature(managed_boxes)]; struct…
Greg Malcolm
  • 3,238
  • 4
  • 23
  • 24
-1
votes
1 answer

rust error "cannot determine a type for this expression"

i write a simple rust program. fn main(){ let port = 80; result::chain(connect("localhost", port as u16)) {|s| send(s,str::bytes("hello world")); }; there is some error on it. macmatoMacBook-Air-2:rust-http kula$ rustc…
kula
  • 345
  • 1
  • 8
-1
votes
1 answer

"expected crate directive" error about rust

Editor's note: This question was asked before Rust 1.0 was released and the syntax, error messages, and even how crates are bundled have changed since then. i wrote a rust example program. code is this: use std; import std::io; fn main() { …
kula
  • 345
  • 1
  • 8
1 2 3
4