1. 08 4月, 2014 1 次提交
  2. 07 4月, 2014 9 次提交
  3. 06 4月, 2014 5 次提交
    • F
      Add support for different relocation models · b78ac5b7
      Flavio Percoco 提交于
      Rust currently defaults to `RelocPIC` regardless. This patch adds a new
      codegen option that allows choosing different relocation-model. The
      available models are:
      
          - default (Use the target-specific default model)
          - static
          - pic
          - no-pic
      
      For a more detailed information use `llc --help`
      b78ac5b7
    • E
      rustc: remove ty_unboxed_vec. · 2d22243b
      Eduard Burtescu 提交于
      2d22243b
    • A
      syntax: Tweak parsing lifetime bounds on closures · d1c584e4
      Alex Crichton 提交于
      In summary these are some example transitions this change makes:
      
          'a ||       => ||: 'a
          proc:Send() => proc():Send
      
      The intended syntax for closures is to put the lifetime bound not at the front
      but rather in the list of bounds. Currently there is no official support in the
      AST for bounds that are not 'static, so this case is currently specially handled
      in the parser to desugar to what the AST is expecting. Additionally, this moves
      the bounds on procedures to the correct position, which is after the argument
      list.
      
      The current grammar for closures and procedures is:
      
          procedure := 'proc' [ '<' lifetime-list '>' ] '(' arg-list ')'
                              [ ':' bound-list ] [ '->' type ]
          closure := [ 'unsafe' ] ['<' lifetime-list '>' ] '|' arg-list '|'
                              [ ':' bound-list ] [ '->' type ]
          lifetime-list := lifetime | lifetime ',' lifetime-list
          arg-list := ident ':' type | ident ':' type ',' arg-list
          bound-list := bound | bound '+' bound-list
          bound := path | lifetime
      
      This does not currently handle the << ambiguity in `Option<<'a>||>`, I am
      deferring that to a later patch. Additionally, this removes the support for the
      obsolete syntaxes of ~fn and &fn.
      
      Closes #10553
      Closes #10767
      Closes #11209
      Closes #11210
      Closes #11211
      d1c584e4
    • A
      rustc: Pass --enable-long-section-names to gcc · 38f7a1b4
      Alex Crichton 提交于
      This was quite a curious bug on windows, and the details can be found in the
      comment I added to src/librustc/back/link.rs
      38f7a1b4
    • B
      name struct in "field `...` is private" error · d4b73a74
      Benjamin Herr 提交于
      d4b73a74
  4. 05 4月, 2014 6 次提交
  5. 04 4月, 2014 10 次提交
  6. 03 4月, 2014 2 次提交
    • A
      Fix fallout of requiring uint indices · 9a259f43
      Alex Crichton 提交于
      9a259f43
    • A
      rustc: Require that vector indices are uints · 46abacfd
      Alex Crichton 提交于
      This commit tightens up the restriction on types used to index slices to require
      exactly `uint` indices. Previously any integral type was accepted, but this
      leads to a few subtle problems:
      
        * 64-bit indices don't make much sense on 32-bit systems
        * Signed indices for slices used as negative indexing isn't implemented
      
      This was discussed at the recent work week, and also has some discussion on
      issue #10453.
      
      Closes #10453
      46abacfd
  7. 02 4月, 2014 1 次提交
  8. 01 4月, 2014 6 次提交
    • H
      rand: bubble up IO messages futher. · bc7a2d72
      Huon Wilson 提交于
      The various ...Rng::new() methods can hit IO errors from the OSRng they use,
      and it seems sensible to expose them at a higher level. Unfortunately, writing
      e.g. `StdRng::new().unwrap()` gives a much poorer error message than if it
      failed internally, but this is a problem with all `IoResult`s.
      bc7a2d72
    • G
      syntax: allow stmt/expr macro invocations to be delimited by []. · be673e77
      Gábor Lehel 提交于
      this is useful for macros like vec! which construct containers
      be673e77
    • A
      Switch some tuple structs to pub fields · 922dcfdc
      Alex Crichton 提交于
      This commit deals with the fallout of the previous change by making tuples
      structs have public fields where necessary (now that the fields are private by
      default).
      922dcfdc
    • A
      rustc: Switch tuple structs to have private fields · 68319797
      Alex Crichton 提交于
      This is a continuation of the work done in #13184 to make struct fields private
      by default. This commit finishes RFC 4 by making all tuple structs have private
      fields by default. Note that enum variants are not affected.
      
      A tuple struct having a private field means that it cannot be matched on in a
      pattern match (both refutable and irrefutable), and it also cannot have a value
      specified to be constructed. Similarly to private fields, switching the type of
      a private field in a tuple struct should be able to be done in a backwards
      compatible way.
      
      The one snag that I ran into which wasn't mentioned in the RFC is that this
      commit also forbids taking the value of a tuple struct constructor. For example,
      this code now fails to compile:
      
          mod a {
              pub struct A(int);
          }
      
          let a: fn(int) -> a::A = a::A; //~ ERROR: first field is private
      
      Although no fields are bound in this example, it exposes implementation details
      through the type itself. For this reason, taking the value of a struct
      constructor with private fields is forbidden (outside the containing module).
      
      RFC: 0004-private-fields
      68319797
    • A
      rpass/cfail: Update field privacy where necessary · d0a80cca
      Alex Crichton 提交于
      d0a80cca
    • A
      Bump version to 0.10 · a5681d25
      Alex Crichton 提交于
      a5681d25