[element model] migrate `lines_longer_than_80_chars`

Bug: https://github.com/dart-lang/linter/issues/5099
Change-Id: I55abada2367bf5416605b7394cfec9d105c30371
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/387611
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Auto-Submit: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
diff --git a/pkg/linter/lib/src/rules/lines_longer_than_80_chars.dart b/pkg/linter/lib/src/rules/lines_longer_than_80_chars.dart
index 5e30073..66e72be 100644
--- a/pkg/linter/lib/src/rules/lines_longer_than_80_chars.dart
+++ b/pkg/linter/lib/src/rules/lines_longer_than_80_chars.dart
@@ -168,7 +168,7 @@
         end = lineInfo.getOffsetOfLine(i + 1) - 1;
         var length = end - start;
         if (length > 80) {
-          var content = node.declaredElement?.source.contents.data;
+          var content = node.declaredFragment?.source.contents.data;
           if (content != null &&
               content[end] == _lf &&
               content[end - 1] == _cr) {