1. 11 9月, 2016 1 次提交
  2. 09 9月, 2016 9 次提交
  3. 08 9月, 2016 16 次提交
  4. 07 9月, 2016 14 次提交
    • U
      Fix argument to FIONBIO ioctl · 3f0462ac
      Ulrich Weigand 提交于
      The FIONBIO ioctl takes as argument a pointer to an integer, which
      should be either 0 or 1 to indicate whether nonblocking mode is to
      be switched off or on.  The type of the pointed-to variable is "int".
      
      However, the set_nonblocking routine in libstd/sys/unix/net.rs passes
      a pointer to a libc::c_ulong variable.  This doesn't matter on all
      32-bit platforms and on all litte-endian platforms, but it will
      break on big-endian 64-bit platforms.
      
      Found while porting Rust to s390x (a big-endian 64-bit platform).
      Signed-off-by: NUlrich Weigand <ulrich.weigand@de.ibm.com>
      3f0462ac
    • U
      Follow target ABI sign-/zero-extension rules for enum types · 8760a5e3
      Ulrich Weigand 提交于
      While attempting to port Rust to s390x, I ran into an ABI violation
      (that caused rust_eh_personality to be miscompiled, breaking unwinding).
      The problem is that this function returns an enum type, which is
      supposed to be sign-extended according to the s390x ABI.  However,
      common code would ignore target sign-/zero-extension rules for any
      types that do not satisfy is_integral(), which includes enums.
      
      For the general case of Rust enum types, which map to structure types
      with a discriminant, that seems correct.  However, in the special case
      of simple enums that map directly to C enum types (i.e. LLVM integers),
      this is incorrect; we must follow the target extension rules for those.
      Signed-off-by: NUlrich Weigand <ulrich.weigand@de.ibm.com>
      8760a5e3
    • B
      Auto merge of #36289 - euclio:self-suggestion, r=jseyfried · f707582a
      bors 提交于
      resolve: Suggest `use self` when import resolves
      
      Improves errors messages by replacing "Maybe a missing `extern crate`" messages
      with "Did you mean `self::...`" when the `self` import would succeed.
      
      Fixes #34191.
      
      Thank you for the help @jseyfried!
      f707582a
    • B
      Auto merge of #36296 - nagisa:pass-timing, r=eddyb · 2819eca6
      bors 提交于
      Count and report time taken by MIR passes
      
      There’s some desire for deeper introspectability into what MIR passes cost us.
      
      -Z time-passes after this PR:
      
      ```
         Compiling test_shim v0.1.0 (file:///home/nagisa/Documents/rust/rust/src/rustc/test_shim)
      time: 0.000; rss: 29MB	parsing
      time: 0.000; rss: 29MB	configuration
      time: 0.000; rss: 29MB	recursion limit
      time: 0.000; rss: 29MB	crate injection
      time: 0.000; rss: 29MB	plugin loading
      time: 0.000; rss: 29MB	plugin registration
      time: 0.032; rss: 54MB	expansion
      time: 0.000; rss: 54MB	maybe building test harness
      time: 0.000; rss: 54MB	assigning node ids
      time: 0.000; rss: 54MB	checking for inline asm in case the target doesn't support it
      time: 0.000; rss: 54MB	complete gated feature checking
      time: 0.000; rss: 54MB	collecting defs
      time: 0.004; rss: 54MB	external crate/lib resolution
      time: 0.000; rss: 54MB	early lint checks
      time: 0.000; rss: 54MB	AST validation
      time: 0.001; rss: 54MB	name resolution
      time: 0.000; rss: 54MB	lowering ast -> hir
      time: 0.000; rss: 56MB	indexing hir
      time: 0.000; rss: 56MB	attribute checking
      time: 0.000; rss: 56MB	language item collection
      time: 0.000; rss: 56MB	lifetime resolution
      time: 0.000; rss: 56MB	looking for entry point
      time: 0.000; rss: 56MB	looking for plugin registrar
      time: 0.000; rss: 56MB	region resolution
      time: 0.000; rss: 56MB	loop checking
      time: 0.000; rss: 56MB	static item recursion checking
      time: 0.000; rss: 56MB	compute_incremental_hashes_map
      time: 0.000; rss: 56MB	load_dep_graph
      time: 0.000; rss: 56MB	type collecting
      time: 0.000; rss: 56MB	variance inference
      time: 0.011; rss: 59MB	coherence checking
      time: 0.000; rss: 59MB	wf checking
      time: 0.000; rss: 59MB	item-types checking
      time: 0.000; rss: 59MB	item-bodies checking
      time: 0.000; rss: 59MB	drop-impl checking
      time: 0.000; rss: 59MB	const checking
      time: 0.000; rss: 59MB	privacy checking
      time: 0.000; rss: 59MB	stability index
      time: 0.000; rss: 59MB	intrinsic checking
      time: 0.000; rss: 59MB	effect checking
      time: 0.000; rss: 59MB	match checking
      time: 0.000; rss: 59MB	liveness checking
      time: 0.000; rss: 59MB	rvalue checking
      time: 0.000; rss: 59MB	MIR dump
        time: 0.000; rss: 59MB	SimplifyCfg
        time: 0.000; rss: 59MB	QualifyAndPromoteConstants
        time: 0.000; rss: 59MB	TypeckMir
        time: 0.000; rss: 59MB	SimplifyBranches
        time: 0.000; rss: 59MB	SimplifyCfg
      time: 0.000; rss: 59MB	MIR passes
      time: 0.000; rss: 59MB	borrow checking
      time: 0.000; rss: 59MB	reachability checking
      time: 0.000; rss: 59MB	death checking
      time: 0.000; rss: 59MB	stability checking
      time: 0.000; rss: 59MB	unused lib feature checking
      time: 0.000; rss: 59MB	lint checking
      time: 0.000; rss: 59MB	resolving dependency formats
        time: 0.000; rss: 59MB	NoLandingPads
        time: 0.000; rss: 59MB	SimplifyCfg
        time: 0.000; rss: 59MB	EraseRegions
        time: 0.000; rss: 59MB	AddCallGuards
        time: 0.000; rss: 59MB	ElaborateDrops
        time: 0.000; rss: 59MB	NoLandingPads
        time: 0.000; rss: 59MB	SimplifyCfg
        time: 0.000; rss: 59MB	Deaggregator
        time: 0.000; rss: 59MB	AddCallGuards
        time: 0.000; rss: 59MB	PreTrans
      time: 0.000; rss: 59MB	Prepare MIR codegen passes
        time: 0.000; rss: 59MB	write metadata
        time: 0.000; rss: 61MB	translation item collection
        time: 0.000; rss: 61MB	codegen unit partitioning
        time: 0.000; rss: 61MB	internalize symbols
      time: 0.007; rss: 61MB	translation
      time: 0.000; rss: 61MB	assert dep graph
      time: 0.000; rss: 61MB	serialize dep graph
      time: 0.000; rss: 61MB	llvm function passes [2]
      time: 0.000; rss: 61MB	llvm function passes [3]
      time: 0.000; rss: 61MB	llvm function passes [1]
      time: 0.000; rss: 61MB	llvm function passes [0]
      time: 0.000; rss: 61MB	llvm module passes [2]
      time: 0.000; rss: 61MB	llvm module passes [1]
      time: 0.000; rss: 61MB	llvm module passes [0]
      time: 0.000; rss: 61MB	llvm module passes [3]
      time: 0.001; rss: 62MB	codegen passes [1]
      time: 0.001; rss: 62MB	codegen passes [2]
      time: 0.001; rss: 62MB	codegen passes [0]
      time: 0.001; rss: 62MB	codegen passes [3]
      time: 0.001; rss: 63MB	codegen passes [1]
      time: 0.005; rss: 63MB	LLVM passes
      time: 0.000; rss: 63MB	serialize work products
      time: 0.001; rss: 63MB	linking
      ```
      
      r? @EddyB or @nikomatsakis
      
      cc @nrc, @Mark-Simulacrum
      2819eca6
    • J
      Add regression test. · d6ea10ec
      Jeffrey Seyfried 提交于
      d6ea10ec
    • J
    • B
      Auto merge of #36252 - joshtriplett:union-field-never-used, r=sanxiyn · fe278a8a
      bors 提交于
      Fix "field is never used" warning to take unions into account
      
      When compiling code containing a union with an unused field, rustc says
      "struct field is never used".
      
      Rather than saying "struct or union", or adding logic to determine the
      type of the item, just change the message to "field is never used",
      dropping the "struct".
      
      Update tests accordingly.
      fe278a8a
    • J
      8cfc69ec
    • J
      a77b55d5
    • B
      Auto merge of #36303 - jonathandturner:rollup, r=jonathandturner · 3b272bf3
      bors 提交于
      Rollup of 8 pull requests
      
      - Successful merges: #36121, #36128, #36241, #36243, #36263, #36267, #36273, #36298
      - Failed merges:
      3b272bf3
    • N
      save-analysis: add a `kind` tag to JSON dumps · 31100403
      Nick Cameron 提交于
      31100403
    • N
      save-analysis: add docs data · 68d29cba
      Nick Cameron 提交于
      68d29cba
    • B
      Auto merge of #36025 - michaelwoerister:incr-comp-hash-spans, r=nikomatsakis · 923bac45
      bors 提交于
      incr. comp.: Take spans into account for ICH
      
      This PR makes the ICH (incr. comp. hash) take spans into account when debuginfo is enabled.
      
      A side-effect of this is that the SVH (which is based on the ICHs of all items in the crate) becomes sensitive to the tiniest change in a code base if debuginfo is enabled. Since we are not trying to model ABI compatibility via the SVH anymore (this is done via the crate disambiguator now), this should be not be a problem.
      
      Fixes #33888.
      Fixes #32753.
      923bac45
    • T
      re-add accidentally removed line · d8c58d40
      Tim Neumann 提交于
      d8c58d40