Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
470cdf5
add bare metal ARM Cortex-A targets to rustc
japaric Jan 15, 2020
de38803
Add -Wl,-znotext to default linker flags to link with lld 9 on FreeBS…
Jan 19, 2020
a3a0776
Merge branch 'master' into bare-metal-cortex-a
japaric Jan 20, 2020
2c0845c
Mark __msan_track_origins as an exported symbol for LTO
nikic Jan 19, 2020
d8c661a
Mark __msan_keep_going as an exported symbol for LTO
tmiasko Jan 21, 2020
dd0507c
Make `TooGeneric` error in WF checking a proper error
varkor Jan 20, 2020
8abbd0b
for now, do not build rust-std for the armv7a-none-eabihf target
japaric Jan 21, 2020
5dee7dd
Handle methods in try diagnostic
phi-gamma Jan 21, 2020
02e66ba
Test try diagnostics for impl and trait methods
phi-gamma Jan 21, 2020
db3b40c
Cleanup: rewrite conditional as match
phi-gamma Jan 21, 2020
d1bb7e1
Privatize private fields of OutputFilenames
Mark-Simulacrum Jan 21, 2020
8c6067c
Store filestem in a pre-formatted form
Mark-Simulacrum Jan 21, 2020
dc97181
Do not base path to append extension
Mark-Simulacrum Jan 21, 2020
eb2da27
bootstrap: update clippy subcmd decription
matthiaskrgr Jan 22, 2020
7962ccb
pprust: use as_deref
Centril Jan 22, 2020
71370c8
librustc_mir: don't allocate vectors where slices will do.
matthiaskrgr Jan 22, 2020
6a6ebb4
Add `-Z no-link` flag
Dec 21, 2019
0c3827b
Rollup merge of #67195 - 0dvictor:nolink, r=tmandry
tmandry Jan 23, 2020
9246b30
Rollup merge of #68253 - japaric:bare-metal-cortex-a, r=alexcrichton
tmandry Jan 23, 2020
51e4424
Rollup merge of #68361 - t6:patch-freebsd-lld-i386, r=alexcrichton
tmandry Jan 23, 2020
bd090c9
Rollup merge of #68388 - varkor:toogeneric-wf, r=eddyb
tmandry Jan 23, 2020
f9b0561
Rollup merge of #68409 - sinkuu:temp_path, r=Mark-Simulacrum
tmandry Jan 23, 2020
97ac259
Rollup merge of #68410 - tmiasko:msan-lto, r=varkor
tmandry Jan 23, 2020
1077ada
Rollup merge of #68425 - phi-gamma:try-method, r=varkor
tmandry Jan 23, 2020
ac3e183
Rollup merge of #68440 - matthiaskrgr:xpyclippy, r=Mark-Simulacrum
tmandry Jan 23, 2020
14e6259
Rollup merge of #68441 - Centril:pprust-as_deref, r=Mark-Simulacrum
tmandry Jan 23, 2020
bfac73c
Rollup merge of #68462 - matthiaskrgr:novec, r=varkor
tmandry Jan 23, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Handle methods in try diagnostic
The diagnostic for diagnostic for methods and trait provided
methods would only show the empty string:

    error[E0277]: the `?` operator can only be used in  that returns `Result` or `Option` (or another type that implements `std::ops::Try`)

Handle the missing cases so it reads ``a method'' / ``an async
method'' / ``a trait method'' respectively.

Signed-off-by: Philipp Gesang <[email protected]>
  • Loading branch information
phi-gamma committed Jan 21, 2020
commit 5dee7dddf24a022184a743b714b5062e83516a87
18 changes: 18 additions & 0 deletions src/librustc/traits/error_reporting/on_unimplemented.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,24 @@ impl<'a, 'tcx> InferCtxt<'a, 'tcx> {
"a function"
})
})
} else if let hir::Node::TraitItem(hir::TraitItem {
kind: hir::TraitItemKind::Method(_, hir::TraitMethod::Provided(body_id)),
..
}) = &node
{
self.describe_generator(*body_id).or_else(|| Some("a trait method"))
} else if let hir::Node::ImplItem(hir::ImplItem {
kind: hir::ImplItemKind::Method(sig, body_id),
..
}) = &node
{
self.describe_generator(*body_id).or_else(|| {
Some(if let hir::FnHeader { asyncness: hir::IsAsync::Async, .. } = sig.header {
"an async method"
} else {
"a method"
})
})
} else if let hir::Node::Expr(hir::Expr {
kind: hir::ExprKind::Closure(_is_move, _, body_id, _, gen_movability),
..
Expand Down