about summary refs log tree commit diff
path: root/compiler/rustc_codegen_cranelift/example/alloc_example.rs
diff options
context:
space:
mode:
authorJubilee <46493976+workingjubilee@users.noreply.github.com>2023-10-05 00:56:29 -0700
committerGitHub <noreply@github.com>2023-10-05 00:56:29 -0700
commitcfce3a919dc09b41ba522202c0bffa9b8191bc57 (patch)
tree327c484ec2e53813031e54c5f2be073d7c4da4c2 /compiler/rustc_codegen_cranelift/example/alloc_example.rs
parentea3454eabb6ac1ac4c0fb1326e72b4f19505b0b8 (diff)
parentdd5f26c42dbe24491cc2aae12bca747d1701936c (diff)
downloadrust-cfce3a919dc09b41ba522202c0bffa9b8191bc57.tar.gz
rust-cfce3a919dc09b41ba522202c0bffa9b8191bc57.zip
Rollup merge of #116296 - compiler-errors:default-return, r=estebank
More accurately point to where default return type should go

When getting the "default return type" span, instead of pointing to the low span of the next token, point to the high span of the previous token. This:

1. Makes forming return type suggestions more uniform, since we expect them all in the same place.
2. Arguably makes labels easier to understand, since we're pointing to where the implicit `-> ()` would've gone, rather than the starting brace or the semicolon.

r? ```@estebank```
Diffstat (limited to 'compiler/rustc_codegen_cranelift/example/alloc_example.rs')
0 files changed, 0 insertions, 0 deletions