1. 08 2月, 2018 12 次提交
  2. 07 2月, 2018 16 次提交
    • B
      Auto merge of #47957 - bobtwinkles:fix_mir_consts, r=nikomatsakis · fee39ba8
      bors 提交于
      [NLL] Improve DefiningTy::Const
      
      Fixes #47590 by fixing the way DefiningTy represents constants. Previously, constants were represented using just the type of the variable. However, this will fail to capture early-bound regions as NLL inference vars, resulting in an ICE when we try to compute region VIDs a little bit later in the universal
      region resolution process. (ref #47590)
      fee39ba8
    • B
      Update trait-associated-const test to new format · e99f8fcb
      bobtwinkles 提交于
      e99f8fcb
    • B
      mir: Fix DefiningTy::Const · 5de094e5
      bobtwinkles 提交于
      Fixes #47590 by fixing the way DefiningTy represents constants. Previously,
      constants were represented using just the type of the variable. However, this
      will fail to capture early-bound regions as NLL inference vars, resulting in an
      ICE when we try to compute region VIDs a little bit later in the universal
      region resolution process.
      5de094e5
    • B
      Auto merge of #47607 - davidtwco:issue-45697, r=nikomatsakis · 4f93357d
      bors 提交于
      MIR-borrowck: augmented assignment causes duplicate errors
      
      Fixes #45697. This PR resolves the error duplication. I attempted to replace the existing sets since there were quite a few but only managed to replace two of them.
      
      r? @nikomatsakis
      4f93357d
    • M
      Add tests for -Zepoch using tyvar_raw_pointer · b8aa8cad
      Manish Goregaokar 提交于
      b8aa8cad
    • M
      Fill in long diagnostic · 83a9f498
      Manish Goregaokar 提交于
      83a9f498
    • B
      Auto merge of #48040 - kennytm:rollup, r=kennytm · bd98fe0c
      bors 提交于
      Rollup of 7 pull requests
      
      - Successful merges: #46962, #47986, #48012, #48013, #48026, #48031, #48036
      - Failed merges:
      bd98fe0c
    • K
      Rollup merge of #48036 - durka:proc-macro-doteq, r=alexcrichton · 7f0e87a7
      kennytm 提交于
      proc_macro: don't panic parsing ..= (fix #47950)
      7f0e87a7
    • K
      Rollup merge of #48031 - matthiaskrgr:exampleconfigtoml_typos, r=kennytm · d0e7da48
      kennytm 提交于
      config.toml.example: fix typos.
      
      Most of them were found by codespell: https://github.com/lucasdemarchi/codespell
      d0e7da48
    • K
      Rollup merge of #48026 - Badel2:doc-assoc-const-object-safe, r=nikomatsakis · ccdb320c
      kennytm 提交于
      Document that associated constants prevent a trait from being made into an object
      
      Fixes https://github.com/rust-lang/rust/issues/47952
      
      Add a short mention of associated constants to E0038
      ccdb320c
    • K
      Rollup merge of #48013 - onur:use-time-in-bootstrap-dist, r=alexcrichton · 3373f656
      kennytm 提交于
      Use time crate in bootstrap dist instead of date
      
      `bootstrap dist` command is trying to run *NIX specific `date` command to get current month and year. This command keep failing when it's called on a Windows command prompt. This patch is making it use time crate.
      
      Closes: #47908
      3373f656
    • K
      Rollup merge of #48012 - scottmcm:faster-rangeinclusive-fold, r=alexcrichton · 4f184eb6
      kennytm 提交于
      Override try_[r]fold for RangeInclusive
      
      Because the last item needs special handling, it seems that LLVM has trouble canonicalizing the loops in external iteration.  With the override, it becomes obvious that the start==end case exits the loop (as opposed to the one *after* that exiting the loop in external iteration).
      
      Demo adapted from https://github.com/rust-lang/rust/issues/45222
      ```rust
      #[no_mangle]
      pub fn foo3r(n: u64) -> u64 {
          let mut count = 0;
          (0..n).for_each(|_| {
              (0 ..= n).rev().for_each(|j| {
                  count += j;
              })
          });
          count
      }
      ```
      
      <details>
       <summary>Current nightly ASM, 100 lines (https://play.rust-lang.org/?gist=f5674c702c6e2045c3aab5d03763e5f6&version=nightly&mode=release)</summary>
      
      ```asm
      foo3r:
      	pushq	%rbx
      .Lcfi0:
      .Lcfi1:
      	testq	%rdi, %rdi
      	je	.LBB0_1
      	testb	$1, %dil
      	jne	.LBB0_4
      	xorl	%eax, %eax
      	xorl	%r8d, %r8d
      	cmpq	$1, %rdi
      	jne	.LBB0_11
      	jmp	.LBB0_23
      .LBB0_1:
      	xorl	%eax, %eax
      	popq	%rbx
      	retq
      .LBB0_4:
      	xorl	%r8d, %r8d
      	movq	$-1, %r9
      	xorl	%eax, %eax
      	movq	%rdi, %r11
      	xorl	%r10d, %r10d
      	jmp	.LBB0_5
      .LBB0_8:
      	addq	%r11, %rax
      	movq	%rsi, %r11
      	movq	%rdx, %r10
      .LBB0_5:
      	cmpq	%r11, %r10
      	movl	$1, %ecx
      	cmovbq	%r9, %rcx
      	cmoveq	%r8, %rcx
      	testq	%rcx, %rcx
      	movl	$0, %esi
      	movl	$1, %edx
      	je	.LBB0_8
      	cmpq	$-1, %rcx
      	jne	.LBB0_9
      	leaq	-1(%r11), %rsi
      	movq	%r10, %rdx
      	jmp	.LBB0_8
      .LBB0_9:
      	movl	$1, %r8d
      	cmpq	$1, %rdi
      	je	.LBB0_23
      .LBB0_11:
      	xorl	%r9d, %r9d
      	movq	$-1, %r10
      .LBB0_12:
      	movq	%rdi, %rsi
      	xorl	%r11d, %r11d
      	jmp	.LBB0_13
      .LBB0_16:
      	addq	%rsi, %rax
      	movq	%rcx, %rsi
      	movq	%rbx, %r11
      .LBB0_13:
      	cmpq	%rsi, %r11
      	movl	$1, %edx
      	cmovbq	%r10, %rdx
      	cmoveq	%r9, %rdx
      	testq	%rdx, %rdx
      	movl	$0, %ecx
      	movl	$1, %ebx
      	je	.LBB0_16
      	cmpq	$-1, %rdx
      	jne	.LBB0_17
      	leaq	-1(%rsi), %rcx
      	movq	%r11, %rbx
      	jmp	.LBB0_16
      .LBB0_17:
      	movq	%rdi, %rcx
      	xorl	%r11d, %r11d
      	jmp	.LBB0_18
      .LBB0_21:
      	addq	%rcx, %rax
      	movq	%rsi, %rcx
      	movq	%rbx, %r11
      .LBB0_18:
      	cmpq	%rcx, %r11
      	movl	$1, %edx
      	cmovbq	%r10, %rdx
      	cmoveq	%r9, %rdx
      	testq	%rdx, %rdx
      	movl	$0, %esi
      	movl	$1, %ebx
      	je	.LBB0_21
      	cmpq	$-1, %rdx
      	jne	.LBB0_22
      	leaq	-1(%rcx), %rsi
      	movq	%r11, %rbx
      	jmp	.LBB0_21
      .LBB0_22:
      	addq	$2, %r8
      	cmpq	%rdi, %r8
      	jne	.LBB0_12
      .LBB0_23:
      	popq	%rbx
      	retq
      .Lfunc_end0:
      ```
      </details><br>
      
      With this PR:
      ```asm
      foo3r:
      	test	rcx, rcx
      	je	.LBB3_1
      	lea	r8, [rcx - 1]
      	lea	rdx, [rcx - 2]
      	mov	rax, r8
      	mul	rdx
      	shld	rdx, rax, 63
      	imul	r8, r8
      	add	r8, rcx
      	sub	r8, rdx
      	imul	r8, rcx
      	mov	rax, r8
      	ret
      .LBB3_1:
      	xor	r8d, r8d
      	mov	rax, r8
      	ret
      ```
      4f184eb6
    • K
      Rollup merge of #47986 - Gilnaa:libtest_relaxed, r=Mark-Simulacrum · a026e8a9
      kennytm 提交于
      libtest: Replace panics with error messages
      
      This replaces explicit panics on failures in libtest with prints to stderr.
      Where "failures" == CLI argument parsing and such
      
      Before:
      ```
      $ ./foo-stable --not-an-option
      thread 'main' panicked at '"Unrecognized option: \'not-an-option\'"', libtest/lib.rs:251:27
      note: Run with `RUST_BACKTRACE=1` for a backtrace.
      ```
      
      After:
      ```
      $ ./foo-nightly --not-an-option
      error: Unrecognized option: 'not-an-option'
      ```
      a026e8a9
    • K
      Rollup merge of #46962 - clarcharr:os_raw_docs, r=QuietMisdreavus · 0a3e07dd
      kennytm 提交于
      Document std::os::raw.
      
      This adds a brief explanation to each type and its definition according to C. This also helps clarify that the definitions of the types, as described by rustdoc, are not necessarily the same from platform to platform.
      0a3e07dd
    • B
      Trait objects cannot contain associated constants · 498ef20a
      Badel2 提交于
      498ef20a
    • D
      bb6e54d4
  3. 06 2月, 2018 12 次提交