Files
swift-mirror/test/Sema/moveonly_lexical_borrow_required.swift
Kavon Farvardin ea1e83b1d7 move noncopyable types out from behind the feature flag
Since these types depend on lexical borrow scopes (a SIL
option), we're now making that the requirement whenever
such types appear.
2023-03-13 22:39:31 -07:00

10 lines
322 B
Swift

// RUN: %target-swift-frontend -typecheck %s
// RUN: %target-typecheck-verify-swift -enable-lexical-borrow-scopes=false
@_moveOnly
public struct MO { // expected-error 2{{noncopyable types require lexical borrow scopes (add -enable-lexical-borrow-scopes=true)}}
let x = 0
}
public func whatever(_ mo: borrowing MO) {}